Relative Content

Tag Archive for pythonslicechunks

Slicing a nested list based on other nested list

I am trying to slice sublists (arr) using elements from other sublists (slc). I am using Python. My code works just fine if there are not repeated values on the sublists to slice (arr), neither case I can not get the chunks.
arr[0] must be sliced with slc[0], arr[1] must be sliced with slc[1] and
arr[2] must be sliced with slc[2].