by Hellios · 12y ago · 0 comments
import sys
sys.setrecursionlimit(x)
Kind of a "hackish" way to do things but you can do it if you need to.
For example, 1000 levels of recursion is more than enough to count all the nodes in a binary tree unless the tree is extremely poorly balanced or inordinately large.