Break for while loop


Hi coders,

I have a general question about how break works.

Here’s the code:

count = 0

while True:
  print count
  count += 1
  if count >= 10:

The question:
Does break change True into False? Or is break just something like a blockade for the loop while True stays True?

Thanks in advance!


no, break will simple stop the loop. It changes nothing to the while loop condition


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.