Break allows loop termination when some condition is met and the control is transferred to the next statement.
>>> for i in range(9): if i==3: break else: print(i) 0 1 2 >>>
Continue allows skipping some part of a loop when some specific condition is met and the control is transferred to the beginning of the loop
>>> for i in range(3): if i==1: continue else: print(i) 0 2 >>>
Pass is used when you need some block of code syntactically, but you want to skip its execution. This is basically a null operation. Nothing happens when this is executed.
>>> for i in range(3): pass >>>
This article is contributed by Prakash. If you like dEexams.com and would like to contribute, you can write your article here or mail your article to admin@deexams.com . See your article appearing on the dEexams.com main page and help others to learn.