Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
while chunk yield chunk solution in Clear category for Chunk by veky
from itertools import islice
def chunking_by(L, n):
it = iter(L)
while chunk := list(islice(it, n)): yield chunk
Jan. 11, 2020
Comments: