Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

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))
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #split #list #chunks
ADD COMMENT
Topic
Name
9+6 =