Iterate With Index in Python: enumerate, zip, and the Modern ToolkitTo iterate with an index in Python, use enumerate(): for i, x in enumerate(items): .... To iterate over several iterables in parallel, use zip(): for a, b in zip(list_a, list_b): .... To do both at once, combine them: for i, (a, b) in enumerate(zip(list_a, list_b)): ...