0
How do you generate anagrams in alphabetical order in python?
my friend needs to make a program called anagramsearch.py that searches a file for angrams of a given word, printing the results in alphabetical order. any advice on how to go about that?
7 ответов
0
Can be quite complex. Are there any further rules, e.g. just all possible permutations of a word or does the output have to be some other existing word or phrase?
Sorry just re-read the post and found the answers.
0
what did you find?
0
Have a look here https://bitbucket.org/trebsirk/algorithms
0
Basically you could permutate the word as input and convert the data from the file as dict or list and check if the permutations are in the list, creating a new sorted list (will be alphabetical).
0
thanks for the tip Marco, confused about the link though
0
Look into the source codes, there are examples for permutations and anagram testing
0
Thanks a bunch dude