* anagram: updates tests to v1.3.0 * anagram: changes function name * anagram: Updates function name
10 lines
256 B
Python
10 lines
256 B
Python
def find_anagrams(word, candidates):
|
|
return [candidate
|
|
for candidate in candidates
|
|
if _letters(candidate) == _letters(word)
|
|
if candidate.lower() != word.lower()]
|
|
|
|
|
|
def _letters(word):
|
|
return sorted(word.lower())
|