L[0] + L[1]*x + L[2]*x**2 + .. + L[n]*x**n,where n = len(L) - 1.
You may not make assumptions on the length of the list, the script must work for all lists of all lengths.
Answer:
L | i | R
-----------+---+-----------
[1,2,3,4] | - | L[0]
[1,2,3,4] | 1 | L[0] + L[1]*x
[1,2,3,4] | 2 | L[0] + L[1]*x + L[2]*x**2
[1,2,3,4] | 3 | L[0] + L[1]*x + L[2]*x**2 + L[3]*x**3
Answer:
L = input('Give a list : ')
x = input('Give a number : ')
R = L[0]
for i in range(1,len(L)):
R = R + L[i]*x**i
print 'the result :', R