Python generators, excellently covered above by C-Dawg, are a quick way of transforming old, pre-iterator python code (or just code designed without iterators in mind) into proper iterators.

It's also often claimed (e.g. on www.python.org) that generators make it easier to handle all the transient data on where exactly you are in the middle of your complex enumeration. Using iterators -- so they say -- you'll be in the middle of some huge calculation, and have to store exactly where you were. I've never run into this, personally, and I believe if you start out thinking in iterators, this will never happen. Perhaps if the iterator is running two totally unrelated iterations, and by some wacky design feature one iteration can somehow butt in and get ahead of the other, forcing you to yield one value, while still trying to figure out the other iteration's step...

Still, whether you write your own iterator or go through the generator song and dance, you end up with similar functionality. The only pity is, you never get to have a real iterable object, one of the nicer aspects of python iterators.