[Tutor] Get a single random sample

Peter Otten __peter__ at web.de
Fri Sep 9 15:03:02 CEST 2011

Peter Otten wrote:

> Steven D'Aprano wrote:
>> # Get ten random samples, sampling with replacement.

I can quote. But not read ;(

>> samples = [random.choice(subset) for i in range(10)]

Sorry for the noise.

More information about the Tutor mailing list