Wednesday, October 28, 2015

generate permutations of [1,2,3]

import itertools
print list(itertools.permutations([1,2,3]))