major updates to the solutions
[wordplay-cdsw-solutions] / scrabble.py
1 WORD_LIST = "sowpods.txt"
2
3 with open(WORD_LIST) as wordlist_file:
4     wordlist = []
5     for word in wordlist_file.readlines():
6         word = word.strip()
7         wordlist.append(word)
8
9 scores = {"a": 1, "c": 3, "b": 3, "e": 1, "d": 2, "g": 2,
10           "f": 4, "i": 1, "h": 4, "k": 5, "j": 8, "m": 3,
11           "l": 1, "o": 1, "n": 1, "q": 10, "p": 3, "s": 1,
12           "r": 1, "u": 1, "t": 1, "w": 4, "v": 4, "y": 4,
13           "x": 8, "z": 10}

Benjamin Mako Hill || Want to submit a patch?