3 ms·
Haha. I feel very silly now. I was just about to respond with the same thing. while True: result = list(islice(iterator, 3)) if not result:
by signed0 13y ago
Haha. I feel very silly now. I was just about to respond with the same thing.
while True:
result = list(islice(iterator, 3))
if not result:
break
yield result