Answers for "python split list in chunks of size"

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 in chunks of size"

Python Answers by Framework

Browse Popular Code Answers by Language