RecursionError: maximum recursion depth exceeded while calling a Python objectz怎么解决?

img

网上找的别人的代码运行时,报错:RecursionError: maximum recursion depth exceeded while calling a Python object

修改递归深度随时

import sys # 导入sys模块
sys.setrecursionlimit(3000) # 将默认的递归深度修改为3000

https://blog.csdn.net/weixin_48419914/article/details/122011753

这篇文章:解决RecursionError: maximum recursion depth exceeded while calling a Python object 也许有你想要的答案,你可以看看