I saw a lot of articles and answers to other questions about slicing 3D lists in python, but I can't apply those methods to my case.
I have a 3D list:
list = [
[[0, 56, 78], [4, 86, 90], [7, 87, 34]],
[[1, 49, 76], [0, 76, 78], [8, 60, 7]],
[[9, 6, 58], [6, 57, 78], [10, 46, 2]]
]
The the last 2 values of the 3rd dimension stay constant but change every time I rerun the code. What the code needs to do is find 2 specific pairs of those last 2 values and slice from one pair to the other. So for example:
pair1 = 86, 90
pair2 = 76, 78
The output should be:
[4, 86, 90], [7, 87, 34], [1, 49, 76], [0, 76, 78]
I know how to find the 2 pairs, I'm just not sure how to slice the list. Thanks in advance for your help and leave a comment if something is unclear.