标签:highlight pytho turn color python python开发 基础 函数 int
函数递归
递归的本质: 就是一个函数调用另外一个函数。
def d():
return ‘123‘
def c():
r = d()
return r
def b():
r = c()
return r
def a():
r = b()
print(r)
a()
def func(n):
n += 1
if n >=4:
return ‘end‘
return func(n)
r = func(1)
print(r)
标签:highlight pytho turn color python python开发 基础 函数 int
原文地址:http://www.cnblogs.com/luchuangao/p/5999629.html