+ 1

# How do generate permutations of a given word?

I want to make list of words based on permutation of a given word.

1 Answer

+ 3

word = input()
from itertools import permutations
lst =[x for x in permutations (word)]
Use permutations function from itertools module.