+ 1
What does "break" mean in this code?
i = 0 while 1==1: print(i) i = i + 1 if i >= 5: print("breaking") break print("Finished")
2 Réponses
+ 11
Break will break this loop. In simple words, loop will end on reaching break and code outside loop will execute.
+ 6
It breaks out of the while loop if i >= 5.