Answers for "python split list into n sized chunks"

0

split into list into even chunks

def chunks(l, n):
    n = max(1, n)
    return (l[i:i+n] for i in range(0, len(l), n))
Posted by: Guest on May-29-2021

Code answers related to "python split list into n sized chunks"

Python Answers by Framework

Browse Popular Code Answers by Language