def f(n, arg1=0, arg2=1, arg3=1): while n >0: arg3 = arg1 + arg2 i = arg3 - arg2 print(i) arg1, arg2 = arg2, arg1 + arg2 n -= 1 return f(n, arg1, arg2)f(1)
本文共 254 字,大约阅读时间需要 1 分钟。
def f(n, arg1=0, arg2=1, arg3=1): while n >0: arg3 = arg1 + arg2 i = arg3 - arg2 print(i) arg1, arg2 = arg2, arg1 + arg2 n -= 1 return f(n, arg1, arg2)f(1)
转载于:https://www.cnblogs.com/jack410/p/6484698.html