Problem Solution Two strings are anagrams if the frequencies of appearing alphabets are the same. Make a dictionary, where the keys are tuples of alphabet(a-z) frequencies. The values are the strings in the given list. When I initiated an dictionary and used append function with a new key, it gave a KeyError. To avoid this, use defaultdict function and pass list as parameter. Then a defaultdict ..