Okay, here is an example of a Python function written recursively to implement factorial calculation:
def factorial(n):
if n == 0:
return 1
else:
return n * factorial(n-1)
In this function, we first check n
if the given number is 0. If yes, return 1. Otherwise, we return the result of n
times factorial(n-1)
. Since this function calls itself repeatedly, we get recursion.