Answered step by step
Verified Expert Solution
Question
1 Approved Answer
write a program in python. Write a program that prompts the user to enter a list of names. Each person's name is separated from the
write a program in python.
Write a program that prompts the user to enter a list of names. Each person's name is separated from the next by a hyphen surrounded by spaces (" - ") and the names are entered firstName lastName, i.e. separated by space ""). Your program should then print out the names, one per line, with the last name followed by the first initial of the first name, followed in turn by "." A sample run of your program should look like: Please enter your list of names: Ada Lovelace - Williamina Fleming - Grace Hopper Annie Easley Lovelace A. Fleming w. Hopper G Easley A. Thank you for using my name organizer! Hint: See Section 10.24 for a quick overview of split(). Do this problem in parts: first, split the list by person (what should the delimiter be). Then, split each of person's name into first and last name (what should the delimiter be here?). If you have a string str, how do you index to extract the first characterStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started