how to add inputs to this piece of code?
<p>If I use the following code introducing the parameters manually, it works:</p>

<pre><code>def evaluatePoly(poly, x):
    result = 0
    for i in range(len(poly)):
        result += poly[i] * x ** i
    return float(result)

&gt;&gt;&gt; evaluatePoly([1,2,2],2)
13
</code></pre>

<p>I would like to be asked to introduce only the coefficients, without brackets, and the value where I want to evaluate my polynomial equation. Something like this:</p>

<pre><code>poly=(raw_input('Enter a list of coefficients from your polynomial equation: '))
x=int(raw_input('Enter the value where you want to evaluate your polynomial equation: '))

print(evaluatePoly(poly, x))
</code></pre>

<p>But if I try that, Python gives me this error:</p>

<pre><code>TypeError: unsupported operand type(s) for +=: 'int' and 'str'
</code></pre>

<p>How can I do it?</p>

<p>Thanks</p>
