Shuffle an array with python, randomize array item order with python

davethegr8 picture davethegr8 · Jan 23, 2009 · Viewed 214.4k times · Source

What's the easiest way to shuffle an array with python?

Answer

David Z picture David Z · Jan 23, 2009
import random
random.shuffle(array)