python program to traverse string in reverse order code example
Example 1: python iterate through string in reverse
for c in reversed(string):
print c
Example 2: print string in reverse order uing for loop python
# reversing a sring using recursion
def reverse_recursion(s):
if len(s) == 0:
return s
else:
return reverse_recursion(s[1:]) + s[0]