Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

does break stop all loops

Using break in a nested loop

In a nested loop, a break statement only stops the loop it is placed in.
Therefore, if a break is placed in the inner loop, the outer loop still
continues. However, if the break is placed in the outer loop, all of the 
looping stops.

 
PREVIOUS NEXT
Tagged: #break #stop #loops
ADD COMMENT
Topic
Name
1+7 =