X-Git-Url: https://projects.mako.cc/source/wordplay-cdsw-solutions/blobdiff_plain/7b538ea99568eb4511b2b92e3f55193796017866..d928fcd3abb683b79b79d8821998aa19025cbed5:/idea_5.py diff --git a/idea_5.py b/idea_5.py new file mode 100644 index 0000000..e4fee38 --- /dev/null +++ b/idea_5.py @@ -0,0 +1,16 @@ +# 5. Find and print the words that have all 5 vowels in alphabetical order. + +import scrabble + +vowels = ["a", "e", "i", "o", "u"] + +for word in scrabble.wordlist: + found_vowels = [] + + for letter in word: + if letter in vowels: + found_vowels.append(letter) + + if found_vowels == vowels: + print(word) +