Via Daily Python-URL (which appears not to provide permalinks): Introduction to Python iterators. This is an extract from Deitel & Deitel’s “Python How To Program” and includes extensive code samples. Iterators are very cool—as I see it, they allow you to overload an object ready for use with Python’s powerful
for ... in ... syntax (as well as other looping methods). This blog is implemented as an object in PHP—had I used Python I could display the whole blog using
for entry in blog: print entry.