Список разделения на каждом NTH Element Python

def chunks(list_in, n):
    # For item i in a range that is a length of l,
    for i in range(0, len(list_in), n):
        # Create an index range for l of n items:
        yield list_in[i:i+n]
# then just do this to get your output
list(chunks(our_list, cut_every))
Filthy Fish