def recursion_fun():
...
recursion_fun()
...
recursion_fun()
def factorial(x):
if x == 1:
return 1
return x * factorial(x - 1)
factorial(5) -> 120
def reverse_string(s):
if s == "":
return s
return reverse_string(s[1:]) + s[0]
reverse_string(‘hello’) -> olleh