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)