Computer Science, asked by joyjain9466, 1 year ago

A program which accepts string from user and display it in reverse order in python

Answers

Answered by swarnav3
0
A program which accepts string from user and display it in reverse order in python is call the(REVERSE STRING)
Answered by fiercespartan
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