📌  相关文章
📜  将数组分成相等的部分切片python代码示例

📅  最后修改于: 2022-03-11 14:45:54.445000             🧑  作者: Mango

代码示例1
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]]