Break recursion limit python

i want to know how to break the recursion limit like i was wondering if i try to recursive a function a thousand times it throw a recursion limit so what if i have the value of recursing a value 1000 times and then use while recursing another thousand times.

look at the example below:

def factorial(n): if n <= 1: return 1 else: return n * factorial(n - 1) print(factorial(998)) def thousand_recursive(1998): if n == 998: #followwed by code i don't how to proceed.

This might be a good one to break off on and start looking for things yourself. A quick web search for Python recursion limit would likely net you an explanation and routes to get around the limit.