Sunday, January 19, 2014

Extra#1 Recursion Limit

An interesting fact that i just knew ...

def max_recursion_call(number):
    print("The maximum number of recursive call is: ", number)
    try:
        max_recursion_call(number + 1)
    except:
        print("That's it")

By calling max_recursion_call(0), i figured out that the maximum number of recursive call can be made in Python is 979 times.

No comments:

Post a Comment