Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Solution to Remove Recursion Limitation in python

 pythonCopyimport sys
sys.setrecursionlimit(5000)
def fact(n):
    """Recursive function to find factorial"""
    if n == 1:
        return 1
    else:
        return (n * fact(n - 1))
    
print(fact(4000))
Source by www.delftstack.com #
 
PREVIOUS NEXT
Tagged: #Solution #Remove #Recursion #Limitation #python
ADD COMMENT
Topic
Name
9+2 =