title: Python Running Sum in List
body: <p>Given the following list:</p>
  
  <pre><code>a=[1,2,3]
  </code></pre>
  
  <p>I'd like to generate a new list where each number is the sum of it and the values before it, like this:</p>
  
  <pre><code>result = [1,3,6]
  </code></pre>
  
  <p>Logic: </p>
  
  <p>1 has no preceding value, so it stays the same.</p>
  
  <p>3 is from the first value (1) added to the value of the second number in the list (2)</p>
  
  <p>6 is from the sum of 1 and 2 from the first two elements, plus the third value of 3.</p>
  
  <p>Thanks in advance!</p>