<div><h4id="pythonhasmanydifferentiteratorobjects">Python has many different iterator objects:</h4><ul>
<li><strong>Iterators returned by the <ahref="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong></li>
<li><strong>Objects returned by the <ahref="#iterator">iter()</a> function, such as list_iterator and set_iterator.</strong></li>
<li><strong>Objects returned by the <ahref="#itertools">itertools</a> module, such as count, repeat and cycle.</strong></li>
<li><strong>Generators returned by the <ahref="#generator">generator functions</a> and <ahref="#comprehension">generator expressions</a>.</strong></li>
<li><strong>File objects returned by the <ahref="#open">open()</a> function, etc.</strong></li>