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?

Expert's answer

""" 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)
LATEST TUTORIALS
APPROVED BY CLIENTS