So I am making a word generator that takes several inputted letters, puts them in all possible positions, and matches them with a document to find words. If I am approaching this wrong please tell me! If not how can I do this? Thanks
to generate all permutations of a given list of letters, use the itertools module.
import itertools
for word in itertools.permutations( list_of_letters ):
print ''.join(word)