Skip to content

Generators and Iterators — Video Resources

← Back to Concept

Best Single Video

Python Tutorial: Generators - How to Use Them and the Benefits You Receive by Corey Schafer (~11 min) Why: Builds generators from the ground up, starting with a normal function and converting it to a generator with yield. Demonstrates memory savings with concrete before-and-after measurements. Clear, concise, and immediately practical. The go-to starting point for understanding generators.

Alternatives

  • Generators by Socratica (~9 min) — A polished, classroom-style explanation of generators with a focus on the conceptual "why." Socratica's production quality makes this feel like a lecture, which some learners prefer.
  • Iterators, Iterables, and Itertools by Socratica (~12 min) — Covers the iterator protocol (iter and next), what makes something iterable versus an iterator, and introduces the itertools module. A different angle that focuses on the protocol underneath generators.

Deep Dives


Last verified: February 2026