title: How to break while loop in an inner for loop in python?
body: <p><code>while</code> doesn't break when i>10 in for loop:</p>
  
  <pre><code>i = 0
  x = 100
  while i&lt;=10:
      for a in xrange(1, x+1):
          print "ok"
          i+=1
  </code></pre>
  
  <p>and it prints <code>"ok"</code> 100 times. How to break the <code>while</code> loop when <code>i</code> reaches 10 in <code>for</code> loop?</p>