Skip to content

Commit

Permalink
challenge_39
Browse files Browse the repository at this point in the history
  • Loading branch information
Mr-Glucose committed Jan 10, 2025
1 parent e078ce6 commit 5969907
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions solutions/challenge_39/word_length_counter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 5969907

Please sign in to comment.