diff --git a/u4/word_count.py b/u4/word_count.py index e135492..539f89d 100644 --- a/u4/word_count.py +++ b/u4/word_count.py @@ -4,8 +4,8 @@ def count_words(sentance: str) -> dict: sent_list = list(sentance) words = defaultdict(int) - delims = [":", "?", "!", "\n", "\t"] - del_chars = ['"', ",", "."] + delims = [":", "?", "!", "\n", "\t", ",", "."] + del_chars = ['"'] forbidden = delims + del_chars + [" ", "'", ""] @@ -25,6 +25,4 @@ def count_words(sentance: str) -> dict: continue words[w.replace("^", "'")] += 1 - return dict(words) - - \ No newline at end of file + return dict(words) \ No newline at end of file