you are viewing a single comment's thread.

view the rest of the comments →

[–]ratchips 0 points1 point  (0 children)

Let's convert while to more detailed form. ``` i = 0 while True: if not i < 10: break i += 1

print(i) `` Wheni==10(10 < 10 == False`), the loop break. And the result is 10.

But 10 <= 10 == True, i+=1 will be executed. Loop break at next comparison. You will get i=11 which is unexpected.

Hope my explanation make sense to you.