what does a break statement ends the execution in python code example
Example 1: break python
# Use of break statement inside the loop
for val in "string":
if val == "i":
break
print(val)
print("The end")
---------------------------------------------------------------------------
s
t
r
The end
Example 2: break function python
if( x > 3):
print('X is greater than 3')
else:
break