The assignment is to write a program that accepts two groups of words from the user and then prints a \"True\" statement if the two are anagrams (or at least if all the lett
Simplest shortest solution
def anagram(word1, word2): return sorted(word1) == sorted(word2)
check
print(anagram("xyz","zyx")) >>True print(anagram("xyz","zyy")) >>False