Selecting elements from a list

Mel Wilson mwilson at
Fri Sep 5 16:20:01 CEST 2003

In article <bj9c2d$87g$05$1 at>,
"Michael Peuser" <mpeuser at> 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