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
Why not just sort the strings?
>>> sorted('anagram') ['a', 'a', 'a', 'g', 'm', 'n', 'r'] >>> sorted('nagaram') ['a', 'a', 'a', 'g', 'm', 'n', 'r'] >>> sorted('anagram') == sorted('nagaram') True