diff --git a/lib.py b/lib.py index f482218..61e9f41 100644 --- a/lib.py +++ b/lib.py @@ -16,5 +16,5 @@ def cat_words(dictionary=DICTIONARY): # remove end of line word = word[:-1] # filter out five letter words - if len(word) == WORD_LENGTH and "'" not in word and not word[0].isupper(): + if len(word) == WORD_LENGTH and all([letter.isalpha() and letter.islower() for letter in word]): yield word