Iterator

Noun · Development

Definitions

  1. An object that enables sequential traversal of a collection without exposing its underlying structure. Implements a standard interface (typically next() and hasNext() or __iter__/__next__) allowing uniform access to elements regardless of the collection type.

    In plain English: An object that lets you step through a collection one item at a time without needing to know how the collection is organized internally.

    Example: "Python's for loop works with any iterator — lists, files, generators, database cursors, you name it."

Related Terms