Efdad317c297a2aee89ef435995dbdb6

It works okay, but I think there is a better way of doing it?

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 !

6869f98aa6911b0f9f13468ccca24813

Simon Law

April 18, 2008, April 18, 2008 13:31, permalink

No rating. Login to rate!

I see what you're doing here, but… why?

Avatar

JL

May 23, 2008, May 23, 2008 18:48, permalink

No rating. Login to rate!

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)
8c44876dda4cdf65331f082686103ad2

yoness

May 30, 2008, May 30, 2008 13:23, permalink

1 rating. Login to rate!

You can modify radically the code:

1
2
3
4
5
6
import random

numbers = input("Numbers to generate: ")

for cheese in range(0,numbers):
print random.randrange(0,100)

Your refactoring





Format Copy from initial code

or Cancel