I am trying to code a program which will ask for a person's full name (first, middle, last) and will print (last, middle, tsrif). Like print their name backwards, but the letters are backwards only on their first name. I can't figure out how to flip the order of the words without flipping their letters. Any help?
My code so far:
import sys
str = raw_input("first middle last")
str.split( );
The
str.split()
function returns the list, it doesn't modify it in place. So you want :(obviously
split_up
is an arbitrary name, the point is that it's a list)