def fib(num): n=0 a,b=0,1 while n<num: print(b) yield a,b=b,a+b n=n+1a=fib(30)next(a)next(a)
原文地址:https://www.cnblogs.com/china520/p/10392451.html
时间: 2024-10-10 09:27:32
def fib(num): n=0 a,b=0,1 while n<num: print(b) yield a,b=b,a+b n=n+1a=fib(30)next(a)next(a)
原文地址:https://www.cnblogs.com/china520/p/10392451.html