Skip to content

Instantly share code, notes, and snippets.



Created Mar 28, 2012
What would you like to do?
Anagram code kata
def make_key(str):
key = list(str)
return "".join(key)
classes = {}
for line in open("wordlist.txt"):
word = line.strip().lower()
key = make_key(word)
words = classes.get(key, set())
if not words:
classes[key] = words
for words in classes.values():
if len(words) > 1:
print words
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.