It change the loop execution from it's normal sequence. When execution leaves a scope, all automatic objects that were created in that scope are destroyed.
The Control Statemetns are:
Summary :
break
: used to terminate the loop entirely.continue
: skips to the next iteration of the loop.pass
: does nothing, act like a placeholder.Examples :
while True:
name = input("Enter the name :")
if name != " ":
break
phone_number = "123-456-7890"
for i in phone_number:
if i == "-":
continue
print(i, end = " ")
for i in range(1,21):
if i == 13:
pass
else:
print(i, end = " ")