I am using a search cursor to get some values. After I would like to add the next total to the total of all the results before it in order. Not sure what to do, iterate, range, re-loop?
Example:
[a,b,c] would result in [a, a+b, a+b+c]
[3,5,2,3] would result in [3, 8, 10, 13]
value <SPAN class="operator token">=</SPAN> <SPAN class="string token">""</SPAN>
<SPAN class="keyword token">with</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>da<SPAN class="punctuation token">.</SPAN>SearchCursor<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"Feature"</SPAN><SPAN class="punctuation token">,</SPAN> <SPAN class="string token">"Field"</SPAN><SPAN class="punctuation token">)</SPAN> <SPAN class="keyword token">as</SPAN> curs<SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">for</SPAN> row <SPAN class="keyword token">in</SPAN> curs<SPAN class="punctuation token">:</SPAN>
value <SPAN class="operator token">=</SPAN> row<SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Use the values in "value" to do what I want.
The script will run in ArcGIS Pro.