May-18-2019, 12:20 AM
Python iterators do not support what you want. You could wrap it in something that caches look-ahead values and then you could query on that object, but I'll leave that as an exercise to the reader.
last pass of for x in iterator:
|
|