0
@Lisa I did that already by using isalpha(). Anyway, I found the problem. The conditional block I used, doesn't account for the case when the input string ends in in an alphabetic character. Fixed this by adding ``` if count > 0: lengths.append(count) ``` outside the for loop. It passes all the test conditions. I wonder if there's a more efficient way to code this.
26th Jun 2024, 12:06 PM
Anudeep
Anudeep - avatar
+ 1
The instruction asks you to "Remove all punctuation."
26th Jun 2024, 11:55 AM
Lisa
Lisa - avatar