Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Chunk by tokiojapan55
from typing import Iterable
def chunking_by(items: list, size: int) -> Iterable:
result = []
while items:
result.append(items[:size])
items = items[size:]
return result
June 22, 2020
Comments: