Define a function 'middle' that returns the 'middle" of each word in a string, where the middle is obtained by removing the 1st and lastcharacter from the word. For instance, middle("stop") returns ’to’. Note that for corner cases of words with two or one characters,the middle is an empty string. Here is an example of middle with a string containing several words.

In the future, when you have something you need help with (especially immediate help) don't just copy-paste your assignment and say you're lost. Show us your best attempt, what it does accomplish (since we know from the assignment what it should do) and why you think it should work. That way, we can help to correct any misunderstandings you have so that for future assignments you'll be more prepared instead of having to come back again. (And of course if you do need to come back that's alright, but the idea is to get you better at programming.)

Join the #python-forum IRC channel on irc.freenode.net for off-topic chat!

Please prefer not to PM members. The point of the forum is so that anyone can benefit. We don't want to help you over PMs/emails/Skype chats that others can't benefit from