From d2b15e9e63794f2517f2bad859779196c9cd56df Mon Sep 17 00:00:00 2001 From: Maqsat <146412142+QamalMaqsat@users.noreply.github.com> Date: Wed, 25 Oct 2023 06:14:08 +0600 Subject: [PATCH] Update 22_Generators.py --- Basics/22_Generators.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Basics/22_Generators.py b/Basics/22_Generators.py index 203719a4..2211512d 100644 --- a/Basics/22_Generators.py +++ b/Basics/22_Generators.py @@ -1,9 +1,8 @@ def fib(): - a, b = 0, 1 + first, second = 0, 1 while True: - yield a - a, b = b, a+b - + yield first + first, second = second, first+second for f in fib(): if f > 100: break