Recursion. Recursion is. Recursion is hard.
A 'base case': a case in which the problem is trivially solved that is reached when a certain condition is satisfied.
A 'general case': all the other cases expressed as the solution of one or more smaller versions of itself.
def foo():
if base_condition():
return
else:
foo()
return