default recursion limit python 3 code example Example: set recursion limit python import sys sys.setrecursionlimit(10**6)