So let's imagine we have a generator, but I'd like to start calculating items from 1500 iteration, instead of start (0). Is there any better way to do that, than just making a lot of next(generator)
callings?
Asked
Active
Viewed 27 times
0
-
yes, look at `itertools.islice` – Mustafa Aydın Feb 07 '21 at 17:34
-
Use `itertools.islice` but it *will* just call `next` under the hood, there is no way to avoid that – juanpa.arrivillaga Feb 07 '21 at 17:34
-
Yeah! Thank you all for the help. That was fast! – Kirashchuk Oleh Feb 07 '21 at 17:42