Selecting elements from a list
Mel Wilson
mwilson at the-wire.com
Fri Sep 5 10:20:01 EDT 2003
In article <bj9c2d$87g$05$1 at news.t-online.com>,
"Michael Peuser" <mpeuser at web.de> wrote:
>from random import random
>rowA1 =[random()]*100000; rowA2=[random()]*100000
Note, though, that each of these would get you 100000
copies of a particular randomly-chosen number.
rowA1 = [random() for i in xrange (100000)]
will give differing numbers.
Regards. Mel.
More information about the Python-list
mailing list