Question: Given a name in the formatlastname, firstnamewhere there is exactly one comma and exactly one space transform the name into the format first_initial. lastname where
Given a name in the formatlastname, firstnamewhere there is exactly one comma and exactly one space
transform the name into the format
first_initial. lastname
where
* first_inital and lastname are both capitalized
* there is exactly one period and space following the first_initial
For example, given s =
ghandi, mahatma
the output will be
M. Ghandi
Use the input statement in the skeleton code:
name = input("Input a name: ")
Step by Step Solution
★★★★★
3.54 Rating (154 Votes )
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
Document Format (2 attachments)
635e25dfc0b65_181860.pdf
180 KBs PDF File
635e25dfc0b65_181860.docx
120 KBs Word File
