Python iterators
15th June 2002
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
.
More recent articles
- First impressions of the new Amazon Nova LLMs (via a new llm-bedrock plugin) - 4th December 2024
- Storing times for human events - 27th November 2024
- Ask questions of SQLite databases and CSV/JSON files in your terminal - 25th November 2024