Next / Previous / Contents / TCC Help System / NM Tech homepage

24.2. Iterators: Values that can produce a sequence of values

Closely related to Python's concept of sequences is the concept of an iterator:

For a given sequence S, an iterator I is essentially a set of instructions for producing the elements of S as a sequence of zero or more values.

To produce an iterator over some sequence S, use this function:

iter(S)