This is my code so far, but I am trying to display olleH,dlroW instead of dlroW, olleH (Hello World). What is wrong with my code. Also i've seen examples that use for statements to reverse a string. But I would like to stick to if else statements (recursion).
def reverse_recursion(string):
if len(string) == 0:
return string
else:
return reverse_recursion(string[1:]) + string[0]