Using Python
Write a program that requests a two-part name and thendisplays the name in the form “lastName, firstName”.
One possible outcome: Enter a 2-part name: John Doe Revisedform: Doe, John
Solution
name = input(“Enter a 2-part name: “).split()print(“Revised form: ” + name[1] + “, ” + name[0])
Please let me know if you have any doubts Please upvote this answer. Thanks!!