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 Tue Jul 11 06:52:23 2017.
Creative Commons License