Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



D'oh. I put in a map(), that returns a list.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: