We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad86d8b commit 7e703e4Copy full SHA for 7e703e4
fibonacci_gen.py
@@ -1,8 +1,8 @@
1
def gen_fibonacci():
2
- seed, next = 0, 1
+ seed, next_ = 0, 1
3
while True:
4
- next, seed = seed, next + seed
5
- yield (next)
+ next_, seed = seed, next_ + seed
+ yield (next_)
6
7
def main(n):
8
for m in gen_fibonacci():
0 commit comments