Skip to content

Instantly share code, notes, and snippets.

@wong2
Created June 18, 2011 05:43
Show Gist options
  • Select an option

  • Save wong2/1032835 to your computer and use it in GitHub Desktop.

Select an option

Save wong2/1032835 to your computer and use it in GitHub Desktop.
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()
@HQMIS
Copy link
Copy Markdown

HQMIS commented Nov 4, 2012

好久远的一篇啊, 哈哈

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