X-Git-Url: https://projects.mako.cc/source/wordplay-cdsw-solutions/blobdiff_plain/7b538ea99568eb4511b2b92e3f55193796017866..d928fcd3abb683b79b79d8821998aa19025cbed5:/idea_4.py diff --git a/idea_4.py b/idea_4.py new file mode 100644 index 0000000..352b66c --- /dev/null +++ b/idea_4.py @@ -0,0 +1,13 @@ +# 4. Find an print the words that contain 4 or more 'l's. + +import scrabble + +for word in scrabble.wordlist: + number_of_ls = 0 + for letter in word: + if letter == "l": + number_of_ls = number_of_ls + 1 + + if number_of_ls >= 4: + print(word) +