|
Data Structures and Algorithms
with Object-Oriented Design Patterns in Python |
An iterator provides a means by which the objects within a container can be accessed one-at-a-time. All iterators share a common interface, and hide the underlying implementation of the container from the user of that container.