递归:python实现斐波那契数列

def main(d1,d2,stop):
if d1==0:
print(d1,d2)
d3 = d1 +d2
print(d3)
if d3<stop:
main(d2,d3,stop)

main(0,1,30)
原文地址:https://www.cnblogs.com/wp0810/p/7468897.html