# Recursive
def reverse(string):
if len(string) == 0:
return string
else:
return reverse(string[1:]) + string[0]
# Iterative
def reverse_iter(string):
if len(string) == 0:
return string
else:
new_string = ""
for i in range(len(string)):
new_string += string[len(string)-i-1]
return new_string