On Fri, Jan 14, 2011 at 8:01 PM, David Hutto <[email protected]> wrote:
> Sorry , the tab button doesn't work for text in google mail, and it
> jumped to send
>
>>>
>
>   import random
>> for x in range(1,10):
         num = random.random()
>       print (num)

this should 'bind' your variable to a knew random each time

>
> This assigns a new random each time, where as outside the for loop it
> assigns it once.
>



-- 
Sometimes...my mama...says I get over excited about technology.
_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to