Skip to content

Instantly share code, notes, and snippets.

Created March 8, 2021 06:24
What would you like to do?
def anagram(word1, word2):
word1 = word1.lower()
word2 = word2.lower()
return sorted(word1) == sorted(word2)
print(anagram("cinema", "iceman"))
print(anagram("cool", "loco"))
print(anagram("men", "women"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment