From bb5edcaeac08a7a8c905d97917057a19a9177ffe Mon Sep 17 00:00:00 2001 From: va270fv Date: Thu, 8 Oct 2026 12:18:57 +0000 Subject: [PATCH] pro --- u4/word_count.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/u4/word_count.py b/u4/word_count.py index 92a5b84..6a0d8c8 100644 --- a/u4/word_count.py +++ b/u4/word_count.py @@ -4,7 +4,7 @@ def count_words(sentence: str) -> dict[str, int]: sentence = sentence.lower() for char in sentence: - if not char.isanum() and char not in ("'", " "): + if not char.isalnum() and char not in ("'", " "): sentence = sentence.replace(char, " ") words = sentence.split()