X-Git-Url: https://projects.mako.cc/source/wordplay-cdsw-solutions/blobdiff_plain/884ad8e21ea1ea9d1dd411b2a503d0dff4294c59..HEAD:/solution_5_easy.py?ds=sidebyside diff --git a/solution_5_easy.py b/solution_5_easy.py index d34efdc..9dda191 100644 --- a/solution_5_easy.py +++ b/solution_5_easy.py @@ -1,7 +1,6 @@ import scrabble - -# Print every other word that starts with 'a' and ends with 9 +# Print every other word that starts with 'a' and is more than 9 letters long. # This is the most basic implementation: keep a boolean to track whether the word # was printed. @@ -10,8 +9,7 @@ should_i_print = True for word in scrabble.wordlist: if word[0] == 'a' and len(word) >= 9: if should_i_print: - print word + print(word) should_i_print = False else: should_i_print = True -