title: Need Help in Python if..for..else Loop
body: <p>I'm new to programming and have found this if...for...else Loop, please help me understand it:</p>
  
  <pre><code>if(True):
      for i in range(0, 1):
          print i
      else:
          print 'x'
  </code></pre>
  
  <p>[written in Python 2.7] Which gives an Output:</p>
  
  <pre><code>0
  1
  </code></pre>
  
  <p>This seems like it executes both the for loop and the else loop, but only else loop is not allowed. Why? What is the difference between this and the normal if...else loop?</p>