Write a Python program that uses test_string that contains a name in the form 'FirstName LastName' prints a *string of the form 'LastName, F.'. *(Only the initial should be output for the first name.)

Respuesta :

test_string = input("Enter your name: ").split()

print("{}, {}".format(test_string[1], test_string[0][0:1]))

I hope this helps!