10 ms·
Python 2 enumerate returns an 'enumerate' object that is more or less a light weight wrapper of the sequence that was passed in. Generators provide a convenien
by maxerickson 12y ago
Python 2 enumerate returns an 'enumerate' object that is more or less a light weight wrapper of the sequence that was passed in.
Generators provide a convenient syntax to implement that sort of object.
- exDM69 12y agoD'oh. I put in a map(), that returns a list.