def baskets(items, basketsize=10):
    """generates balanced baskets from iterable, contiguous items"""
    num_items = len(items)
    num_baskets = max(1, num_items // basketsize)
    if num_items % basketsize and basketsize < num_items:
        num_baskets += 1
    step = num_items // num_baskets
    for i in range(0, num_items, step):
        yield items[i:i + step]
