def split(sets: list, quantity: int):
    """
    splits a list into smaller lists, each of sub list contains 
    the (quantity) of items

    Args:
    * [sets] list to split into smaller lists
    * [quantity] the items in each sub list

    Returns:
    * [list] a new list of sub lists
    """
    output = []
    sublist = None
    max_contains = quantity
    for item in sets:
        if sublist is None:
            sublist = []
        if max_contains > 0:
            sublist.append(item)
            max_contains = max_contains - 1
        if max_contains == 0:
            output.append(sublist)
            sublist = []
            max_contains = quantity
    if len(sublist) > 0:
        output.append(sublist)
    return output
