title: Sum all numbers in a given range of a given list Python
body: <p>How can I write a function to get the sum of the items in the given list between the indices a and b. For example give <code>aList=[6,3,4,2,5]</code> and <code>a=1</code>, <code>b=3</code>, the function should return 9. Here is my code:</p>
  
  <pre><code>def sumRange(L,a,b):
      sum= []
      L = [6,3,4,2,5]
      for i in range(a,b+1,1):
      sum +=L[i]
      return sum
  </code></pre>