title: Python - While false loop
body: <pre><code>fn='a'
  x=1
  
  while fn:
      print(x)
      x+=1
      if x==100:
          fn=''
  </code></pre>
  
  <p>Output: 1 ... 99</p>
  
  <pre><code>fn=''
  x=1
  
  while fn:
      print(x)
      x+=1
      if x==100:
          fn='a'
  </code></pre>
  
  <p>Output: while loop does not run.</p>
  
  <hr>
  
  <p>What is the reason for the while loop not running?</p>
  
  <p>Is it that the condition that ends a while loop is 'False' and therefore it's not capable of performing 'while false' iterations?</p>