📌  相关文章
📜  你如何将列表分成大小均匀的块? - Python 代码示例

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

代码示例1
def chunks(lst, n):
    """Yield successive n-sized chunks from lst."""
    for i in range(0, len(lst), n):
        yield lst[i:i + n]