I'd like to iterate over a sequence by both element and index, something like
for (element, index) in somefun(sequence): ... Obviously this is easy enough to code, but I seem to remember that such a function was added to standard Python at some point, but I just can't dig up a reference to it. Anyone know? I hate writing even small amounts of code to do something that's already in the library--it's inelegant, and probably a lot slower too :-) Thanks, Ken -- http://mail.python.org/mailman/listinfo/python-list