1 2 3 4 5 6 7 8 9 10 11 12 13
from random import random as _ eval(compile("\n".join( ["(lambda %s:" % (chr((121 - ((25 - (ord("z") - y)))))) for y in [z for z in range(ord("a"),ord("z")) ] ])+"\n((a))"+"\n".join( [")(%s+_()*%s)" % (chr(w),chr(w)) for w in range(ord("b"),ord("z")) ] )+")(2)","","single"))
Refactorings
No refactoring yet !
JL
May 23, 2008, May 23, 2008 18:48, permalink
I also can't see the point. But, hey, this seems to work...
1 2
from random import random print reduce(lambda x,y: x + x * random(), [2] + [0] * 24)
It works okay, but I think there is a better way of doing it?