How can I avoid using nested tuple unpacking when enumerating a list of tuples like this?
for i, (x, y) in enumerate(zip("1234", "ABCD")):
# do stuff
Use itertools.count
to avoid nested tuple unpacking:
from itertools import count
for i, x, y in zip(count(), "1234", "ABCD"):
# do stuff