5 lines
92 B
Python
5 lines
92 B
Python
def fibGen(n):
|
|
a, b = 0, 1
|
|
while n>0:
|
|
yield a
|
|
a, b, n = b, a+b, n-1
|