I think I understand generators?

by Security Dude

Generators

Does not construct a list.
Only useful purpose is iteration.
Once consumed, can’t be reused.

http://www.dabeaz.com/generators-uk/GeneratorsUK.pdf

http://www.pythontutor.com/

http://blog.doughellmann.com/2007/10/pymotw-itertools.html

https://github.com/bigsnarfdude/generatorsCoroutinesPYDATA

Advertisements