Cumulative sum of list in dynamo


Hi . I am trying to make a cumulative sum of the list. For example i have a list with numbers 1, 2, 3, 4 and i want to create new list that would be 1, 3, 6, 10 … i searched the internet for python script but nothing has worked in dynamo. <span style=“color: #555555;”> I would like to just set one variable, connect it to the list, and then new variable of new list that i could drag and work with it</span>

I found this on the internet but i cant implement it in dynamo:
<pre class=“prettyprint prettyprinted”>


That should be pretty straight forward:





First we create multiple ranges - the first item, first and second, first to third, etc. Then we sum each new list an we get the final result.


There is also an OOTB node which works nicely, List.Scan. Also a Lunchbox node which does the same, but without the seed input:


Thank you guys you helped me. This is the result