import sys sys.setrecursionlimit(1500) # set the maximum depth as 1500 def recursion(n): if(n <= 0): return print n recursion(n - 1) if __name__ == "__main__": recursion(1200)
http://www.pythontip.com/blog/post/5518/
相关文章
- 12-29【pyhton】【转】修改递归次数
2023-12-29 21:40:04
import sys sys.setrecursionlimit(1500) # set the maximum depth as 1500 def recursion(n): if(n <= 0): return print n recursion(n - 1) if __name__ == "__main__": recursion(1200)
http://www.pythontip.com/blog/post/5518/