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?
5/16/2018 3:51:09 PM
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.
what did you find?
Have a look here https://bitbucket.org/trebsirk/algorithms
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).
thanks for the tip Marco, confused about the link though
Look into the source codes, there are examples for permutations and anagram testing
Thanks a bunch dude
Send us a message