Find Permutations of a given word using python
Find Permutations of a given word using python
from itertools import permutations
word = input("Enter the word: ")
perm = (permutations(word))
for i in perm:
print("".join(i))
word = input("Enter the word: ")
perm = (permutations(word))
for i in perm:
print("".join(i))
ANSWER
Enter the word: ABC
ABC
ACB
BAC
BCA
CAB
CBA
Post a Comment