Q. Write a program to input a line of text and create a new line of text where each word of input line is reversed.

 

Answer = 

 

sen = input("Enter the line :-")
lst = sen.split()
for i in range(-1,-len(lst)-1,-1):
    print(lst[i] , end= " ")


Post a Comment

You can help us by Clicking on ads. ^_^
Please do not send spam comment : )

Previous Post Next Post