randomly generate n of each of two types
Alan Isaac
aisaac at american.edu
Mon Feb 12 07:33:45 EST 2007
<petercable at gmail.com> wrote in message
news:1171272184.544941.277510 at s48g2000cws.googlegroups.com...
> >>> r = [x for x in test.random_types(10)]
> >>> r
> [False, False, False, False, False, False, False, False, False, False,
> True, True, True, True, True, True, True, True, True, True]
>
> I think it needs a cast to a float:
Mea culpa. I **always** import division from __future__
and tend to assume everyone else does too.
Thanks,
Alan
More information about the Python-list
mailing list