19 mins

Screencasts: Generator Expressions in Python

List comprehensions make new lists. Generator expressions make new generator objects. Generators are iterators, which are lazy single-use iterables. Unlike lists, generators aren't data structures. Instead they do work as you loop over them.

Watch a new Python screencast every week

Profile picture of Trey

My name is Trey Hunner. I do corporate Python training for teams and I teach Python online through Python Morsels.

In Python Morsels, I publish a new Python screencast every week.

If you want to learn something new every week, join Python Morsels!

Join Python Morsels ✨