Answer the question
In order to leave comments, you need to log in
Python, how to output text backwards?
I started learning python, and at the end of the chapter on lists and indexes, I came across a problem: It is
necessary to write a program that accepts user text and displays this text on the screen in reverse.
How to do it?
Answer the question
In order to leave comments, you need to log in
Hey! But this will work for you:
s = 'Python is the best programming language'
>>> s[: :-1]
Outputs - 'egaugnal gnimmargorp tseb eht si nohtyP'
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question