Skip to content

Instantly share code, notes, and snippets.

@wong2 wong2/sleepsort.py
Created Jun 18, 2011

Embed
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()
@HQMIS

This comment has been minimized.

Copy link

commented Nov 4, 2012

好久远的一篇啊, 哈哈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.