python divide into equal parts code example Example: python split range into n groups import numpy x = range(25) l = numpy.array_split(numpy.array(x),6)