递归
1.两个例子
def fac1(x): if x>0: print(x, end=' ') fac1(x-1) fac1(5)
大框框是函数体,小框框是print
def fac2(x): if x>0: fac2(x-1) print(x, end=' ') # fac1(5) fac2(5)
def fac1(x): if x>0: print(x, end=' ') fac1(x-1) fac1(5)
大框框是函数体,小框框是print
def fac2(x): if x>0: fac2(x-1) print(x, end=' ') # fac1(5) fac2(5)