How do I sample randomly based on some probability(wightage)?

Jaime Fernandez del Rio jaime.frio at
Wed May 27 01:10:05 EDT 2009

On Tue, May 26, 2009 at 8:42 PM, Sumitava Mukherjee
<smukh at> wrote:
> On May 26, 11:39 pm, Sumitava Mukherjee <sm... at> wrote:
>>>>> [Oh, I forgot to mention. I am looking for sampling without replacement.]

That means that, you'll have to code something that updates the sums
of probabilities after each extraction...

Would there be a smart way of doing this, of just adding the whole
updated list again is the best, or at least good enough?

( O.o)
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus
planes de dominación mundial.

More information about the Python-list mailing list