next up previous contents
Next: 4 Building New Relations Up: 3 Primitive Data Structures Previous: 3.3 Lists and Tuples

3.4 Generators

Generators are similar to iterators in that they provide us with sequential access to a collection of values. Iterators provide read and write access to elements that are actually stored in some collection. The sequence of values provided by a generator need not actually be stored in any collection, and thus a generator does not provide an lvalue.

Web Accessibility