Python collections

Python Iterator and Iterable Basics

A Python iterator is an object that enables the elements inside a collection object, such as a lists, tuples, dictionaries, and strings, to be looped over and accessed one at a time. Such collections are called iterables and their common characteristic is that they can provide an iterator.