A program which accepts string from user and display it in reverse order in python
Answers
Answered by
0
A program which accepts string from user and display it in reverse order in python is call the(REVERSE STRING)
Answered by
0
Let's first take the input from the user and them, display the sentence in the reverse order.
sentence = input('Enter your sentence:')
sentence = sentence.split()
sentence = sentence[::-1]
sentence = ' '.join(sentence)
print(sentence)
You will get your desired answer.
Hope this helps.
Similar questions