mirror of
https://github.com/Hizenberg469/Python-tutorial.git
synced 2026-04-20 07:22:23 +03:00
11 lines
164 B
Python
11 lines
164 B
Python
def fib(number):
|
|
a = 0
|
|
b = 1
|
|
for i in range(number):
|
|
yield a
|
|
temp = a
|
|
a = b
|
|
b = temp + b
|
|
|
|
for x in fib(20):
|
|
print(x) |