Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # recursive_limit_of_999.py
- def recursive(limit, n=0):
- if n >= limit:
- return n
- return recursive(limit, n + 1)
- for z in [998,50,999]:
- try:
- print recursive(z)
- except:
- print z, '!!! RuntimeError: Maximum Recursion Depth Exceeded'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement