Print a string reversed.
Input
A single line containing the string s (it may contain spaces and symbols).
Output
The characters of s in reverse order.
Print a string reversed.
A single line containing the string s (it may contain spaces and symbols).
The characters of s in reverse order.
Example 1
hello
olleh
hello reversed is olleh.
Example 2
racecar
racecar
A palindrome reversed is itself.
Example 3
abc def
fed cba
Spaces are characters too, so they move as well.
You do not need a loop in most languages — many have a built-in way to reverse a sequence.
In Python, slicing with a step of -1 reverses a string: `s[::-1]`.
Read the line and emit its characters in reverse order.
print(input()[::-1])
Tell us what needs to change, who it affects and any important deadline. We will review the context and reply with useful next questions.