els = ["a", "b", "c"] def _enum(els): return zip(range(len(els)), els) for idx, el in _enum(els): print(idx, el)