Skip to content

iter::chunks

chunks(items, size: Integer)

ParameterTypeDescription
itemsIterableThe items to split into chunks
sizeIntegerThe maximum size of each chunk

Returns

(Generator) A list of chunks where each chunk is a list of items of the given size.