Name

break

Examples
for i in range(5):
    if i == 2: 
        break
print(i) # Prints 2
Description Ends the execution of a structure such as for, or while and jumps to the next statement after.
Syntax
	for i in xrange(10):
	    statements
	    if (condition):
	        break

	while (i < 10):
	    statements
	    if (condition):
	        break
Related for
while
Updated on Sun Nov 26 15:34:42 2017.
Creative Commons License