Randomize list order

Fredrik Lundh fredrik at pythonware.com
Thu Feb 22 12:43:17 EST 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