📅  最后修改于: 2022-03-11 14:45:54.445000             🧑  作者: Mango
import more_itertools as mt
#Create an array and use chunked() method
iterable = range(11)
n = 3
list(mt.chunked(iterable, n))
# [[0, 1, 2], [3, 4, 5], [6, 7, 8], [9, 10]]