#Python - 81 93 148 150 153
Python - 81 93 148 150 153
Tweaking @BiggAl's code, since that's the game we're playing....
import threading as t,sys for a in sys.argv[1:]:t.Timer(int(a),print,[a]).start() ... or 97 175 with delayed thread starting
import threading as t,sys for x in [t.Timer(int(a),print,[a]) for a in sys.argv[1:]]:x.start() Takes input via the command line, ala
./sleep-sort\ v0.py 1 7 5 2 21 15 4 3 8 As with many python golfs, there comes a point where the code is compact enough that aliasing variables to shorten names doesn't even save characters.
This one is funky though because it aliases sys and threading BOTH as t, so sys.argv becomes t.argv. Shorter than from foo import *, and a net character savings! However I suppose Guido wouldn't be pleased...
Note to self - learn c and stop golfing in python. HOLY COW THIS IS SHORTER THAN THE C SOLUTION!