CodeMIRAI
0 XP

Reverse a string

Easy +30 XP Solved

Read one line of text and print it reversed.

For hello print olleh.

Input
hello
Expected output
olleh
Input
CodeMIRAI
Expected output
IARIMedoC
Show a hint

A slice with a step of -1, text[::-1], walks the string from the end to the start.

Show a solution
Python
Loading the editor…
Run the tests to check your solution.