Respuesta :

In pyton:

name = input("What is your name? ")

lst = name.split()

print(f"{lst[-1]}, {lst[0]}")

I hope this helps!