Iterators & Generators (yield, Lazy Evaluation, Data Pipelines) - Python Tutorial for Beginners #24
5views
0012:27
T
Taught by Celeste AI - AI Coding Coach
View on YouTubeDescription
Learn iterators and generators in Python! ♾️
In this lesson, you will learn:
✅ The iterator protocol: __iter__ and __next__
✅ Custom iterator classes (Countdown, EvenNumbers)
✅ Manual iteration with next() and StopIteration
✅ Generator functions with the yield keyword
✅ Generator expressions vs list comprehensions
✅ Memory efficiency of generators
✅ Fibonacci generator
✅ Generator pipelines (chaining generators)
✅ yield from for delegating to sub-generators
✅ Mini Project: Data Processing Pipeline
🕐 Timestamps:
0:00 - Introduction
0:22 - Iterator Basics Explained
0:49 - Iterator Basics Demo
3:23 - Generator Functions Explained
3:50 - Generator Functions Demo
6:38 - Data Pipeline Explained
7:05 - Data Pipeline Demo
10:56 - Recap
💻 Source Code: https://github.com/GoCelesteAI/python_iterators_generators
🔗 Previous: Lesson 23 - Decorators & Class Methods
🔗 Next: Lesson 25 - Context Managers
#Python #PythonTutorial #LearnPython #Programming #Iterators #Generators #Yield #PythonBasics
Tags
Python, Python tutorial, Python for beginners, learn Python, iterators, generators, yield, __iter__, __next__, StopIteration, generator expressions, pipelines,
Python basics, CelesteAI
Tags
PythonPython tutorialPython for beginnerslearn Pythoniteratorsgeneratorsyield__iter____next__StopIterationgenerator expressionspipelines
Back to tutorialsOpen in YouTube
Duration
12:27
Published
February 10, 2026
Added to Codegiz
March 15, 2026