An iterable provides an iterator through iter(). Each next() consumes one value. Once exhausted, an iterator raises StopIteration. Create a fresh iterator to traverse a reusable collection again.
- Section
- Study materials
- Kind
- Notes
- Subject
- Programming
- Subtopic
- Python iterators
- Difficulty
- Beginner