Contribute Media
A thank you to everyone who makes this possible: Read More

How to write a generator expression

Description

List comprehensions make lists; generator expressions make generators. Generators are lazy single-use iterables which generate values as you loop over them.

Details

Improve this page