Python break Function


Python break statement breaks out of an loop.

>>> for i in range(1,8):
... 	if(i == 5):
... 		break   #break out if i equals 5
... 	print (i)
...
1
2
3
4