I am writing how to input, output, and output a string in Python in the opposite direction. I look forward to working with you.
First, how to enter a string in Python.
s = input()
If you want to output as it is.
print(s)
When you want to output the character string in the opposite direction.
print(s[::-1])
that's all. Thank you very much.
Recommended Posts