Possible Duplicate:
How to generate all permutations of a list in Python
Say I have a range, 0-2. I want to shuffle these numbers and print out all of the possibilities:
[0, 1, 2]
[0, 2, 1]
[1, 2, 0]
[1, 0, 2]
[2, 0, 1]
[2, 1, 0]
How would I do this in Python for any range 0-N?