Can’t get this to work.
I would like to make consequential sublists of the main list based on the closest summation of the numbers compared to another list of intended sums. I hope this makes sense,

I have a main list with 200 numbers.
Then another list of sums (60 and 100).

I intend to take items adding them up one by one from the main list till the sum is just above 60, then create a new list of those numbers.
Then with the remaining list, take more items till the sum is just above 100, and create a new list of those.
Finally, return a list with two sublists of the numbers that add up to the coresponding sums.

list[0][0] all the items from the begining of the list that the sum is just above 60
list[0][1] the rest of the items in the list whose sum is just above 100

There are at least one paranthesis placed wrongly, think that the list assignment might also be off… Generally I prefer using python and or nodes to accomplish my tasks

Hey @Jonathan.Olesen, I just noticed something. The script is producing a summation of a sequence starting from 0, regardless of the contents of the main list.