Given a base list myList and a list of the desired lengths of each sub-list lengths
myList = [0,1,2,3,4,5,6,7,8,9]
lengths = [3,4,3]
How would the following list of lists be created in Python?
result = [[0,1,2],[3,4,5,6],[7,8,9]]
The sum of each integer in lengths will always be equal to the length of myList, no end effects!