3 # Make a list of the highest scoring word that starts with each letter.
5 # This is a bit more advanced, but you already know how to do every single piece of this.
7 # This only returns 1 word with the given score.
10 expensive_word_score = {}
12 for word in scrabble.wordlist:
13 first_letter = word[0]
14 if first_letter not in expensive_word:
15 expensive_word[first_letter] = ''
16 expensive_word_score[first_letter] = 0
20 score = score + scrabble.scores[char]
22 if expensive_word_score[first_letter] < score:
23 expensive_word[first_letter] = word
24 expensive_word_score[first_letter] = score
27 for key in expensive_word:
28 print "{key}: {word}, {score}".format(key=key, word=expensive_word[key], score=expensive_word_score[key])