Why I think range is a wart.

logistix logstx at bellatlantic.net
Wed Mar 13 18:01:32 EST 2002


>
> There's more than one way to heal a wart.
>
> Daniel
>

# my fav

literator = lambda x:zip(range(len(x)), x)

for x,y in literator(['a','b','c','d']):
    print x,y






More information about the Python-list mailing list