From 387fd7f2f01672a7098289e386b7bd53a20089eb Mon Sep 17 00:00:00 2001 From: Daniel Tsvetkov Date: Mon, 17 Jan 2022 12:42:35 +0100 Subject: [PATCH] only alphalower words --- lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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