Further Resources
Lazy Looping: The Next Iteration: practical uses of generators and lazy looping
Loop Better: a deeper look at iteration: my article and talk on how iterators work in Python
How to make an iterator: My article about how generator functions are the easy way to make an iterator
range is not an iterator:
rangeobjects seem like an iterator, but they aren’t!Comprehensible Comprehensions: My talk on comprehensions
How For Loops Work: a shorter explanation of the iterator protocol
✕
↑
A Python Tip Every Week
Need to fill-in gaps in your Python skills? I send weekly emails designed to do just that.