In this example we will show how to call the function itself in Python.
Source Code
def factorial(n):
if n == 1:
return 1 # the recursion ends
return n * factorial(n - 1) # minus one, recursive call
print(factorial(5))
Output:
120