4 # What is the longest word that starts with a q?
6 # This problem was ill-specified. What if there isn't a single longest word? What if
8 # We designed this problem with that ambiguity in mind, because sometimes the thing
9 # we want to measure may not exist, or may not exist in the way we anticipate.
12 # This solution keeps EVERY word of the longest length.
15 length_of_longest_word = 0
17 for word in scrabble.wordlist:
20 if len(word) > length_of_longest_word:
21 length_of_longest_word = len(word)
22 longest_so_far = [word]
23 elif len(word) == length_of_longest_word:
24 longest_so_far.append(word)
25 #print longest_so_far # Use this to see the progression.