We use Python 3.6

go back Level: Intro (img: IN / score: 1) level Bite 105. Slice and dice

203 out of 227 users completed this Bite ...
Will you be Pythonista #204 to crack this Bite?
Average Bite difficulty 1-10 rating: 4.6
» Up for a challenge? 💪

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.

Github login button