RecursionError: maximum recursion depth exceeded while calling a Python objectit
def foo(n): print(n) n = n + 1 foo(n) if __name__ == '__main__': foo(1)
997io
歡迎自測import
import sys sys.setrecursionlimit(2000) def foo(n): print(n) n = n + 1 foo(n) if __name__ == '__main__': foo(1)