Created
June 18, 2011 05:43
-
-
Save wong2/1032835 to your computer and use it in GitHub Desktop.
SleepSort-Python using threading.Timer
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
好久远的一篇啊, 哈哈