title: Produce a list of y-values (function-values) at specific x-values taken from a list
body: <p>I would like to produce a list of y-vales (i.e. function-values) based on x-values taken from a list.</p>
  <p>I have programed a function <code>eval_poly(p,x)</code> which produces the y-value for a function p at a certain point x:</p>
  <pre><code>def eval_poly(p,x): 
  ans = 0
  for degree,coeff in enumerate(p):
      ans += coeff*x**degree # ekvationen som ska räknas
  return ans
  </code></pre>
  <p>And I also have created a list with the x-values I want to use (the idea is to later plot a graph with these):</p>
  <pre><code>def plot_poly(p,x_start=-10,x_end=10,color='b'):
  
      lst = list(range(x_start, x_end + 1))
      print(lst)
  </code></pre>
  <p>And now I want to calculate all y-values using <code>eval_poly(p, x)</code> for all x-values. How can I do that? This is what I have tried:</p>
  <pre><code> for x in lst:
      lst_y = list(eval_poly(p,x))
      print(lst_y)
  </code></pre>
  <p>But I get <code>TypeError: 'int' object is not iterable</code>?</p>