Avoid Multiple Next () Statement in Python Generator
Avoid Multiple Next () Statement in Python Generator Question: I’m using a library that returns a generator. Is there a way to start at a particular iteration without using multiple next () statement? In a simple for loop, I could do the following. array = [2, 5, 1, 4, 3] for i in array [2:]: …