What is recursion? Question Give an example. in progress 0 Python Dhruv2301 55 years 2 Answers 737 views Great Grand Master 0
Answers ( 2 )
When a function calls itself it is known as recurssion.
For example:
def factorial(n):
if(i==0 || i==1):
When a function calls itself it is known as recurssion.
For example:
def factorial(n):
if(i==0 || i==1):
return 1
else
return n*factorial(n-1)