📅  最后修改于: 2022-03-11 14:45:33.084000             🧑  作者: Mango
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))