[Tutor] A puzzle for you
Glenn T Norton
gtnorton at earthlink.net
Sat Oct 14 14:47:52 CEST 2006
John Fouhy wrote:
>>From the python_dev LiveJournal community ---
>
>Predict the outcome of the following code:
>
>##
>from random import *
>seed()
>[choice(dict((x+1,0) for x in range(1000))) for x in range(693)][0]
>##
>
>
>
random.choice( [ SyntaxError: invalid syntax, 42 the answer is young
skywalker. always the answer is 42. ] )
--
"Ketchup. For the good times... " - Ketchup Advisory Board
Glenn Norton
Application Developer
Nebraska.gov
1-402-471-2777
glenn at nebraska.gov
More information about the Tutor
mailing list