GH avatar Bite 105. Slice and dice

Take the block of text provided and strip off the whitespace at both ends. Split the text by newline (\n) using split.

Loop through the lines and if the first character of each (stripped) line is lowercase, split the line into words and add the last word to the (given) results list, stripping the trailing dot (.) and exclamation mark (!) from the end of the word.

At the end of the function return the results list.

430 out of 477 users completed this Bite.
Will you be Pythonista #431 to crack this Bite?
It takes an average of ~46 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 5.0 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Login and get coding
We use Python 3.7