Break Statement

break statement is a jump statement that is used to pass the control to the end of the loop.

When break statement is applied the control points to the line following the body of the loop , hence applying break statement makes the loop to terminate and controls goes to next line pointing after loop body.

Example :

for i in [1,2,3,4,5]:
    if i==4:
        print('Element found')
        break
    print(i)

Output :

>>>>>>
1
2
3
Element found
>>>>>>