Implemented anagram detection in Python.