title: Raspberry PI for loop to flash LED not working
body: <p>I've got a Raspberry PI and am trying to make the LED flash like so:</p>
  
  <pre><code>def flash():
      GPIO.output(channel, not GPIO.input(channel))
      sleep(1)
      GPIO.output(channel, not GPIO.input(channel))
  </code></pre>
  
  <p>This works if I call it in my code, it flashes for one second.</p>
  
  <p>If I use this in a loop, to make it flash > 1 time, it does not work.</p>
  
  <pre><code>while True:
          flash()
  </code></pre>
  
  <p>It never flashes.  If I call flash 2 times in a row outside the loop, it works.</p>
  
  <p>What gives?</p>