Lesson 13 of 20 · about 15 min
Iterators and generators
An iterator hands out values one at a time, only when asked. Generators make iterators with yield, so you can work with sequences too big (or infinite) to store all at once.
🔓 Unlock this lesson
This lesson is part of the DoingCamp Pass. Members get every lesson in every course, with all the interactive visuals, coding exercises and challenges.
In this lesson you'll learn:
- Iterator
- Generator
- Lazy evaluation
Free to try in F03 Programming 2: Abstraction & Recursion:
The first 3 lessons of every course are free, no account needed.