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()