That is just what I need. I did't mind on 'divide and conquer' :(
Thanks a lot!
--
Jordi
--
http://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano <[EMAIL PROTECTED]> writes:
> e.g. you would do this: random.sample(xrange(10**10), 60)
> except it raises an exception.
For a population that large and a sample that small (less than
sqrt(population size), the chance of collision is fairly small, so you
can just discard duplicates
On Wed, 12 Apr 2006 06:44:29 -0700, Paul Rubin wrote:
> "jordi" <[EMAIL PROTECTED]> writes:
>> I need the random.sample functionality where the population grows up to
>> long int items. Do you know how could I get this same functionality in
>> another way? thanks in advance.
>
> Nothing stops you
On Wed, 12 Apr 2006 06:29:01 -0700, jordi wrote:
> I need the random.sample functionality where the population grows up to
> long int items. Do you know how could I get this same functionality in
> another way? thanks in advance.
I'm thinking you might need to find another way to do whatever it i
"jordi" <[EMAIL PROTECTED]> writes:
> I need the random.sample functionality where the population grows up to
> long int items. Do you know how could I get this same functionality in
> another way? thanks in advance.
Nothing stops you:
>>> from random import sample
>>> a = [n**25 for n in
I need the random.sample functionality where the population grows up to
long int items. Do you know how could I get this same functionality in
another way? thanks in advance.
Jordi
--
http://mail.python.org/mailman/listinfo/python-list