Randomize list order

Fredrik Lundh fredrik at pythonware.com
Thu Feb 22 18:43:17 CET 2001


Warren Postma write:
> You know, an in-place list.scramble() method would be nice;
> It could also be useful card games and self test scripts. ;-)

random.shuffle(list)

Cheers /F

<!-- (the eff-bot guide to) the standard python library:
http://www.pythonware.com/people/fredrik/librarybook.htm
-->







More information about the Python-list mailing list