title: how can i avoid generator in python
body: <p>I want to plot a function in python but I can't seem to do it. I am running the following code, but I get an error that says I can't multiply a generator and a float together. Where is this coming from?</p>
  
  <pre><code>from math import *
  import matplotlib.pyplot as plt
  t=0.1
  cd=t*exp(-t/2)
  tau=10
  nt=100
  v=0.01
  w=0.9
  u=0.4
  s0=10
  p=5
  
  for i in range (1,10):
      sigma= u/(w+(s0/(p*cd)))
      print(sigma)
      C= lambda ksi: cd * (1-exp(((u-w * sigma)/v)*ksi))
      plt.plot([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1],[C(i for i in range (-10,-1))])
      plt.xlabel(ksi)
      plt.ylabel(concentration)
      plt.title("tumeur avec regénessence")
      plt.legend()
      plt.show()
      t+=tau/nt
  </code></pre>
  
  <p>this is the error I get </p>
  
  <pre><code>Traceback (most recent call last):
    File "C:\Users\ilyes\Downloads\tumeur_avec_regénesence.py", line 18, in &lt;module&gt;
      plt.plot([-10,-9,-8,-7,-6,-5,-4,-3,-2,-1],[C(i for i in range (-10,-1))])
    File "C:\Users\ilyes\Downloads\tumeur_avec_regénesence.py", line 17, in &lt;lambda&gt;
      C= lambda ksi: cd * (1-exp(((u-w * sigma)/v)*ksi))
    TypeError: unsupported operand type(s) for *: 'float' and 'generator'
  </code></pre>