title: Python - how to add integers (possibly in a list?)
body: <p>I'm doing an assignment for school, I'm up to a part where i have to have the 'User' input a list of integers, the program must then add the integers in the list together and return:</p>
  <pre><code>Total: $[sum of integers]
  </code></pre>
  <p>as of yet, i have</p>
  <pre><code>cost = input(&quot;Enter the expenses: &quot;)
  cost = int(cost)
  total = sum(i)
  print(&quot;Total: $&quot; + i)
  </code></pre>
  <p>but it keeps returning the error:</p>
  <pre><code>Traceback (most recent call last):
    File &quot;C:\Python33\Did I Spend Too Much.py&quot;, line 2, in &lt;module&gt;
      cost = int(cost)
  ValueError: invalid literal for int() with base 10: '10 15 9 5 7'
  </code></pre>
  <p>Where '10 15 9 5 7' are the integers I entered in testing.</p>
  <p>Any help with this would be greatly appreciated</p>