find_all_anagrams(string), which take a string
as input and returns a list of all words in the file
english_words.txt
that are anagrams of the input string.
More specifically given an input string the function should
return a list [word1, ..., wordN] such that each word in this list
is a word in the dictionary file such that the value
function anagrams(string,word) is True (as specified
in part (a) of this coursework).
| Examples | |
|---|---|
| INPUT | OUPUT |
| 'cheese' | [] |
| 'Python' | ['phyton', 'typhon'] |
| 'relating' | ['alerting', 'altering', 'integral', 'tanglier', 'triangle'] |
anagrams(s1,s2)
function for part (a), you should call this function in your
definition of the find_all_anagrams(string) function.
It is much better programming style to do that, rather than repeat
the full code for checking anagrams within
find_all_anagrams(string).