title: Conditional statements in python with an iterative process
body: <p>I am simulating the temperature of a material in various circumstances. I would like to produce a plot of temperature versus time, where all the temperature drops by an additional 5 degrees after a certain temperature and then the rate of temperature change is observed. Initially I had the following: </p>
  
  <pre><code>for i in range(1,len(t)):
      te[i] = te[i-1] + f(te[i-1])*dt    
  </code></pre>
  
  <p>Which was used to plot a curve decreasing with time (t). I would like to produce two parts to the plot now. The x-values of my plot are t. The y-values are Te. I would like to decrease all Te values by an additional 5, after the time at which Te is less than 80. I usually use IDL so would say something along the lines of T where(t=80). This is what I have so far, obviously the syntax is completely incorrect, and the i values are indexes and not values of time.</p>
  
  <pre><code>t80 = t where Te &lt;= 80.0
  
  for i in range(1,t80):
      te[i] = te[i-1] + f(te[i-1])*dt 
  
  for i in range(t80,len(t)):
      te3[i] = te3[i-1] + f(te3[i-1])*dt - 5
  </code></pre>
  
  <p>Does anyone know how I would define t80 in python?</p>