1.

Write a program to accept a name containing three words and display the surname first followed by the first and middle names . Input : MOHANDAS KARAMCHAND GANDHI Output:GANDHI MOHANDAS KARAMCHAND

Answer»

input("ENTER NAME: ").split()print(" ".JOIN([name[-1], *name[:-1]]))



Discussion

No Comment Found