Leetcode Maximum Recursion Depth In Python Iteration