please help shrink this each_with_index() implementation

Antoine Pitrou solipsis at pitrou.net
Tue Jan 5 22:10:00 CET 2010



>> Couldn't you just use the built-in enumerate() to replace the whole
>> thing?
> 
> Because that would involve, like, reading an entire Python book just to
> locate that method?

Actually, no. It just involves reading one of the most important pages in 
the documentation, the page which describes the built-in functions:

http://docs.python.org/library/functions.html

Don't forget that the Python documentation is rich and structured.
And good luck.





More information about the Python-list mailing list