Ad
Code
Diff
  • from itertools import *
    
    def permut(arr):
        return [list(p) for p in permutations(arr)]
    • from itertools import *
    • def permut(arr):
    • resL = []
    • for perm in permutations(arr):
    • resL.append(list(perm))
    • return resL
    • return [list(p) for p in permutations(arr)]