tips for this exercise?

Paul Rubin http
Tue Mar 28 15:41:34 EST 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