Skip to content

Commit 7e703e4

Browse files
author
Naveen Purushotham
committed
edited the variable name next to avoid confusion
1 parent ad86d8b commit 7e703e4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fibonacci_gen.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
def gen_fibonacci():
2-
seed, next = 0, 1
2+
seed, next_ = 0, 1
33
while True:
4-
next, seed = seed, next + seed
5-
yield (next)
4+
next_, seed = seed, next_ + seed
5+
yield (next_)
66

77
def main(n):
88
for m in gen_fibonacci():

0 commit comments

Comments
 (0)