From cde1ebeae31fce3f44b258d2f9c4aa25fd415d14 Mon Sep 17 00:00:00 2001 From: Maqsat <146412142+QamalMaqsat@users.noreply.github.com> Date: Fri, 27 Oct 2023 07:38:51 +0600 Subject: [PATCH] Update 22_Generators.py --- Basics/22_Generators.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Basics/22_Generators.py b/Basics/22_Generators.py index 203719a4..181efe00 100644 --- a/Basics/22_Generators.py +++ b/Basics/22_Generators.py @@ -1,10 +1,9 @@ -def fib(): +def gen(): a, b = 0, 1 while True: yield a a, b = b, a+b - -for f in fib(): - if f > 100: +for i in fib(): + if i > 100: break - print(f) + print(i)