tips for this exercise?

John Salerno johnjsal at NOSPAMgmail.com
Tue Mar 28 18:54:21 EST 2006


Paul Rubin wrote:
> 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.

Thanks, looks like just what I was needing!



More information about the Python-list mailing list