src/main/python/bktools/ext/python/collections.py
def chunks(collection, size: int):
    """
    Create sub-lists from the base collection with the desired size.

    Parameters:
        collection: The collection
        size: Number of items per sub-list
    """
    for index in range(0, len(collection), size):
        yield collection[index: index + size]

    Create sub-lists from the base collection with the desired size.

    Parameters:
        collection: The collection
        size: Number of items per sub-list
    
Create sub-lists from the base collection with the desired size.
Create sub - lists from the base collection with the desired size .
def chunks(collection, size: int):
    for index in range(0, len(collection), size):
        yield collection[index: index + size]
def chunks ( collection , size : int ) : for index in range ( 0 , len ( collection ) , size ) : yield collection [ index : index + size ]
Create sub-lists from the base collection with the desired size.
Create sub - lists from the base collection with the desired size .
"""
    Create sub-lists from the base collection with the desired size.

    Parameters:
        collection: The collection
        size: Number of items per sub-list
    """
collection
None
size
int
Number of items per sub-list
Number of items per sub - list