Permutations of an array in py

Algorithm to print all possible permutations of an array in python