From a7b60d7560447185f7639a206dbfd239bfca8805 Mon Sep 17 00:00:00 2001 From: shreyakar20 Date: Mon, 5 Oct 2026 16:09:34 +0530 Subject: [PATCH] Fix word length calculation --- python-open-source-challenge/issue-03.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-open-source-challenge/issue-03.py b/python-open-source-challenge/issue-03.py index 2a69b12..e2f19d7 100644 --- a/python-open-source-challenge/issue-03.py +++ b/python-open-source-challenge/issue-03.py @@ -16,7 +16,7 @@ def word_lengths(sentence): lengths = {} for word in words: # TODO: Check how repeated words and their lengths are recorded. - lengths[word] = len(word) + 1 + lengths[word] = len(word) # TODO: Check punctuation and whitespace behavior. return lengths # TODO: Check whether the result preserves the required information.