import itertools def enumerate(iterable): return itertools.izip(itertools.count(), iterable)
– richtig lustig wird das erst, wenn ihr Laufzeit und Speicherverbrauch für große iterables messt.