Let's say I have two lists:
A = [15,2,3,42,5,6,7,82,94,12,1,21,2,3,4,5,5,3,2,2,22,3,4,5,6,6,5........] # len(A) = 65
B = [15, 20, 4, 11, 12, 3]
As you can see the sum of numbers in list B is equal to 65 which is also length of list A.
What I want to do is that splitting list A into lists based on numbers in list B such as first list of lists contains 15 elements, second one 20, third one 4 and etc. I am waiting for your answers. Thanks in advance.
I tried some things but could not achieve what I want.