title: A different type of iterative function
body: <p>I would like to define a function that iterates a given logistic recurrence relation n times, I have defined functions which 'break' when the function has converged, but not like this.</p>
  
  <pre><code>def logistic(x0,r,n):
  for i in (1,n-1):
      xi = r * x0 * (1-x0)
      print xi
      xi=x0 
  </code></pre>
  
  <p>I know this is very bad :(</p>