Skip to content

Iterators and generators are powerful abstractions within Python that have a variety of uses. This article reviews how they are defined, how they are related, and how they can help programmers work in an elegant and flexible way with data structures and data streams of an unknown or infinite size.

License

Notifications You must be signed in to change notification settings

python-supply/iterators-generators-and-uncertainty

Repository files navigation

iterators-generators-and-uncertainty

When working with data streams, state spaces, and other abstractions that represent large or unbounded structures, it can be tempting to custom-build solutions that may become increasingly complex and difficult to maintain. Understanding a range of features that are already available in a language or its built-in libraries can help mitigate this while saving significant time and effort (both your own and that of others who build upon your work).

Iterators and generators are powerful tools in the Python language that have compelling applications in a number of contexts. This article reviews how they are defined, how they can be used, how they are related to one another, and how they can help you work in an elegant and flexible way with data structures and data streams of an unknown or infinite size.

About

Iterators and generators are powerful abstractions within Python that have a variety of uses. This article reviews how they are defined, how they are related, and how they can help programmers work in an elegant and flexible way with data structures and data streams of an unknown or infinite size.

Topics

Resources

License

Stars

Watchers

Forks