โ† All lessons

Lesson 42 of 62 ยท about 16 minutes

Generators ๐ŸŒŠ

Generators ๐ŸŒŠ A list holds every value in memory at once. That is fine for ten items, but not for ten million lines of a log file, or for a sequence that never ends. A generator produces values one at a time, only when asked. This is called being lazy , andโ€ฆ

This lesson is part of Pythonaut Pro. The first two lessons are free, so you can start there and see how it works.

See the free lessons