tips for this exercise?

Paul Rubin http
Tue Mar 28 22:41:34 CEST 2006


John Salerno <johnjsal at NOSPAMgmail.com> writes:
> Is there a better way to extract a certain number of items from a list
> (so maybe I don't need the for loop)? Is a list even the right type to
> use, since it gets edited in place? Perhaps a set?

See the doc for random.sample.



More information about the Python-list mailing list