Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

split range python

def split(a, n):
    k, m = divmod(len(a), n)
    return (a[i*k+min(i, m):(i+1)*k+min(i+1, m)] for i in range(n))
 
PREVIOUS NEXT
Tagged: #split #range #python
ADD COMMENT
Topic
Name
1+4 =