Increment and while loop
<p>Following is the code I'm executing in IDLE for Python 3.5.2 on Windows 10:</p>

<pre><code>spam = 0
while spam &lt; 5:
    print('Hello, world.')
    spam = spam + 1
</code></pre>

<p>I can see Hello World printed 5 times however when entering spam in IDLE, I can see the integer 5.
Shouldn't this be logically int 6 since while loop will stop as soon as the spam is incremented by 1 from 5 and spam variable is passed with the incremented int?</p>

<p>Thank you!</p>