🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
[TOC] 参考链接:https://www.shangyexinzhi.com/article/363884.html ## 递归图文解释 ![](https://img.shangyexinzhi.com/xztest-image/article/a9ad0b2e7fc4b214d79773088bf5c95c.jpeg?x-oss-process=image/resize,w_670) ``` def func(n): print "递:%d "%n, if n==1: res = 1 else: res = n*func(n-1) print "归:%d "%res, return res func(4) ``` 结果: ![](https://img-blog.csdnimg.cn/20200323140459806.png)