python slice list into equal parts code example
Example 1: split list into lists of equal length python
[lst[i:i + n] for i in range(0, len(lst), n)]
Example 2: python split range into n groups
import numpy
x = range(25)
l = numpy.array_split(numpy.array(x),6)