Python Program to input any sentence and reverse it word by word


sen=input('enter sentence')

r=sen.split(' ')

x=' '

for i in r:

    x+=i[::-1]+' '

print(x)

    

    

    

    

    

    

    

    


Comments

Some popular posts

Python Program that computes the net amount of a bank account based a transaction log from console input.