Adding numbers in a list gives TypeError: unsupported operand type(s) for +: 'int' and 'str'
<p>IÂ´m writing a simple calculator program that will let a user add a list of integers together as a kind of entry to the syntax of python. I want the program to allow the user to add as many numbers together as they want. My error is:</p>

<pre><code>Traceback (most recent call last):
  File "Calculator.py", line 17, in &lt;module&gt;
    addition = sum(inputs)
TypeError: unsupported operand type(s) for +: 'int' and 'str'
</code></pre>

<p>My code is:</p>

<pre><code>#declare variables
inputs = []
done = False

#while loop for inputting numbers 
while done == False:
    value = raw_input()
#escape loop if user enters done
    if value == "Done":
        print inputs
        done = True
    else:
        inputs.append(value)

addition = sum(inputs)
print addition
</code></pre>

<p>When using <code>raw_input()</code> you're storing a string in <code>value</code>. Convert it to an int before appending it to your list, e.g.</p>

<pre><code>inputs.append( int( value ) )
</code></pre>

python