On Fri, May 16, 2008 at 5:43 PM, Joel Miller <[EMAIL PROTECTED]> wrote: > I'm looking for a faster way to do the following problem: > > I have an urn with many different colors of marbles in it. I pull one > out and note the color. I do not replace it.
You probably know, this is called sampling without replacement. If you can put all the 'marbles' in a list, here is a promising approach: http://groups.google.com/group/comp.lang.python/browse_thread/thread/dff9425afdb744e5/6b9a84329c0815d4?lnk=raot This is probably worth looking at too though I can't understand it at this hour: http://safari.oreilly.com/0596007973/pythoncook2-CHP-18-SECT-4 Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor