from itertools import zip, count minha_lista = ["foo", "bar", "baz"] * 500 indices_de_bar = [i for i, j in zip(count(), minha_lista) if j == "bar"]