Question: In python, Complete the provided function, FirstMiddleLast(). FirstMiddleLast() takes in a string and returns a new string with the first, middle, and last character. If

In python,

Complete the provided function, FirstMiddleLast(). FirstMiddleLast() takes in a string and returns a new string with the first, middle, and last character. If the word has an even number of characters grab the middle two characters. It is safe to assume that no string passed in will be less than 3 characters.

Example:

Input: hello

Return value: hlo

Input: Grounds

Return value: Gus

Input: plural

Return value: purl

Input: password

Return value: pswd

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!