re: Write a script to identify an anagram VIEW POST

FULL DISCUSSION
 

In Python, I've always used the builtin Counter collection!

from collections import Counter

def isAnagram(word, check_word):
    return Counter(word) == Counter(check_word)
code of conduct - report abuse