grouped#

grouped(lst: list, size: int) list[source]#

Returns a list of lists of length ‘size’. The last list will have size <= ‘size’.

Parameters:
Return type:

list