Possible Duplicate:
How to generate all permutations of a list in Python
I am given a list [1,2,3]
and the task is to create all the possible permutations of this list.
Expected output:
[[1, 2, 3], [1, 3, 2], [2, 3, 1], [2, 1, 3], [3, 1, 2], [3, 2, 1]]
I can't even think from where to begin. Can anyone help?
Thanks