def create_slices(start, stop, step=None, length=1):
 if (step is None):
  step = length
 slices = [slice(t, (t + length), 1) for t in range(start, ((stop - length) + 1), step)]
 return slices

def create_slices ( start , stop , step = None , length = 1 ) : if ( step is None ) : step = length slices = [ slice ( t , ( t + length ) , 1 ) for t in range ( start , ( ( stop - length ) + 1 ) , step ) ] return slices
generate slices of time indexes .