From 596990751b430e792fbd67b235c39af3bf88ec52 Mon Sep 17 00:00:00 2001 From: Dorvil Lens Marc-Arthur Date: Fri, 10 Jan 2025 02:37:50 -0500 Subject: [PATCH] challenge_39 --- solutions/challenge_39/word_length_counter.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/solutions/challenge_39/word_length_counter.py b/solutions/challenge_39/word_length_counter.py index e67baba99..cd55d969b 100644 --- a/solutions/challenge_39/word_length_counter.py +++ b/solutions/challenge_39/word_length_counter.py @@ -19,6 +19,11 @@ def word_lengths(input_sentence: str) -> list[int]: Returns: list: A list of integers representing word lengths. + Assumptions: + - If the input sentence is empty, the function will return an empty list. + - Punctuation is ignored when calculating word lengths. + - Case sensitivity does not affect word length calculation. + Examples: >>> word_lengths("Hello world!") [5, 5]