from itertools import cycle, islice, dropwhile
L = [1, 2, 3, 4]
cycled = cycle(L)
skipped = dropwhile(lambda x: x != 4, cycled)
sliced = islice(skipped, None, 10)
result = list(sliced)
print(result)
Cycle through list starting at a certain element