To see the control flow statements in python3.
The break statement is used for premature termination of the current loop.
After abandoning the loop, execution at the next statement is resume
The pass statement is a null operation.
Nothing happens when it executes.
The continue statement in Python returns the control to the beginning of the current loop.
#break statement
print(“*****Break statement output*****”)
string=’sathish’
for i in string:
if(i==’i’):
break
#it did not take below print statement
print(“this is break statement”)
print(“Curretnt name is:”,i)
#continue statement
print(“*****continue statement output*****”)
string=’sathish’
for i in string:
if(i==’i’):
continue
print(“this is continue statement”)
print(“Curretnt name is:”,i)
#pass statement
print(“*****Pass statement output*****”)
string=’sathish’
for i in string:
if(i==’i’):
pass
print(“this is pass statement”)
print(“Curretnt name is:”,i)