Control statements alter the
sequential execution of a program.
These are three Types
Break statement makes the program exit a loop early.
for i in range(1, 11):
if i == 4:
break
print(i)
1
2
3
Skips current loop step and moves to the next.
# Print all numbers from 1 to 5, except 3
for i in range(1, 6):
if i == 3: # Skip number 3
continue
print(i)
1
2
4
5