While loop does not end
<p>Hi can someone tell me why this doesn't work? It runs on forever and doesn't end. When the a value reaches 10 it should exit the loop.</p>

<pre><code>a=0
while a!=10:
    for counter in range(11):
        a+=counter
        print a
</code></pre>
