Css220

profilep_patel359
allPermutations.py

# First import itertools package to implement # permutations method in python. This method # takes a list as an input and return an object # list of tuples that contain all permutation in a list form. # A Python program to print all # permutations using library function from itertools import permutations # Get all permutations of [1, 2, 3] perm = permutations([1, 2, 3]) # Print the obtained permutations for i in list(perm): print(i)