I have a very interesting problem that I need to solve.
Assume that I have a string in the following format:
input = ['opst tops', 'opst opts', 'opst pots', 'eip pie', 'eip epi']
The above string will help me find anagrams of words. For example, the word "tops" has signiature "opts", meanwhile, the word "opts" also has signiature "opst" ... Hence, all words has signiature "opst" should be grouped together, as followed. The output is the word anagram class.
output = ['tops opts pots', 'pie epi']
I am new to python and I'd appreciate if you can help. Sorry about the confusion and hope this make sense.