x[i] as loop variable

Raymond Hettinger vze4rx4y at verizon.net
Thu Oct 23 17:10:40 EDT 2003


[Just]
> But isn't the feature a neccesity to make this work:
>
>    for a, b in zip(seqA, seqB):


Yes, that is why it is there to begin with.
But that doesn't mean going off the deep-end and writing:

    for a[3] in data: . . .
    for a[:] in data: . . .
    for a.abomination in data: . . .
    for d[k] in data: . . .


Raymond Hettinger






More information about the Python-list mailing list