Another strategy for finding out if two words are anagrams of each other involves counting the frequency of letters in each word and comparing the frequency counts. If the words have the same counts for each of their letters, they're anagrams.s
Write a program anagram_analysis2.py
that has an areAnagrams()
function that takes two strings as parameters, and uses the this "letter frequency" strategy to identify anagramss. Return True
if they are anagrams of each other, and False
otherwise.
Once you've got this second analyzer completed, run a series of tests in which a series of increasingly long anagrams are checked against each other.