( item )
| 3 | # returns a signature that will be the same |
| 4 | # for a whole class of anagrams |
| 5 | def getSignature( item ): |
| 6 | item_chars = [] |
| 7 | for i in range(len(item)): |
| 8 | item_chars.append(item[i]) |
| 9 | item_chars.sort() |
| 10 | return string.join(item_chars, "") |
| 11 | |
| 12 | # goes through a list of strings and strips |
| 13 | # away the new lines at the end |
no test coverage detected