title: Summing a List in Python Based on the Index of a Loop
body: <p>I have a list with numbers in it and I would like to sum different parts (in successive order) of that list and store those values in a new list. </p>
  
  <p>Example:</p>
  
  <pre><code>a = [0, 1, 2, 3, 4, 5]
  b = []
  b.append(a[0])
  b.append(a[0] + a[1])
  b.append(a[0] + a[1] + a[2])
  </code></pre>
  
  <p>Of course the list I have is much longer so I would assume I need a for loop, but I am unsure how to proceed.</p>