is this pythonic?

Thomas Lotze thomas at thomas-lotze.de
Thu Jul 21 04:54:29 EDT 2005


Mage wrote:

> Or is there better way?
> 
> for (i, url) in [(i,links[i]) for i in range(len(links))]:
>   ...
> 
> "links" is a list.

for i, url in enumerate(links):

-- 
Thomas




More information about the Python-list mailing list