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.

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

Buy Now Login and get coding
We use Python 3.7