def perm(arry): if arry==[]: return [arry] resultList = [] for i in range(len(arry)): restArry=arry[:i]+arry[i+1:] for x in perm(restArry): resultList.append(arry[i:i+1]+x) return resultList
def perm(arry): if arry==[]: return [arry] resultList = [] for i in range(len(arry)): restArry=arry[:i]+arry[i+1:] for x in perm(restArry): resultList.append(arry[i:i+1]+x) return resultList