python print inside vs outside function? : <p>the below code had previously printed the fibonnacci using for loop at end.  I moved the print inside the function and then called it but no fibonacci nubers were printed out in spite of the print within the function.  Shouldnt they be?</p>

<pre><code>   def fibon(n):
       a = b = 1
       for i in range(n):
           yield a
           a, b = b, a + b
           print(a)  # move here inside function but doesnt print?

   fibon(20)
</code></pre>

<p>old code works as:</p>

<pre><code>   for x in fibon(100):
        print(x)  
</code></pre>
