Answer to Question #102540 in Python for Victoria

Question #102540
it says that you have to output a code that is last name then first name using input. how do you do that?
1
Expert's answer
2020-02-09T09:23:06-0500
""" Program to display names in reverse order
"""


# Request user input
full_name = input("Enter full name: ")
# List containing names
names = full_name.split(' ')
# Reverse order of names in the list
names.reverse()
# Display names in reverse order
print("Names in reverse order:", *names)

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS