Loading...
Loading...
Loading...
Write a recursive reverse(text) that returns the text backwards. Read one word and print the reversed word.
Example
Input
order
Output
redro
Letters in reverse.
Try the problem first. Open one hint at a time.
A word of one letter is already reversed.
Reverse the part after the first letter, then add the first letter at the end.
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor