Skip to content

Instantly share code, notes, and snippets.

Created Jun 18, 2011
What would you like to do?
SleepSort-Python using threading.Timer
from __future__ import print_function
from threading import Timer
l = [8, 2, 4, 6, 7, 1]
for n in l:
Timer(n, lambda x: print(x), [n]).start()
Copy link

HQMIS commented Nov 4, 2012

好久远的一篇啊, 哈哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment