E.g:
 input:  I live in New York
 output: York New in live I
P.S: I have used s[::-1], this just reverses the string, like
     kroY weN ni evil I, but this is not the desired output.
I also tried :
def rev(x) :
    x = x[::-1]
    for i in range(len(x)) :
        if x[i] == " " :
            x = x[::-1]
            continue
        print x
But this also stands incorrect. Kindly help me in writing the code.
 
     
     
     
     
     
     
    