List the differences between break and continue statements.
Advertisements
Questions
List the differences between break and continue statements.
Continue statement is used only in theloop statement.
Distinguish Between
Advertisements
Solution
| S. No. | Break | Continue |
| 1. | Break statement is used to terminate a block in which it exists. | Continue statement is used to move the control to the next iteration of the loop ignoring other statements. |
| 2. | Break statement can be used in switch-case as well as in loop statements. | Continue statement is used only in the loop statement. |
shaalaa.com
Control Structure
Is there an error in this question or solution?
RELATED QUESTIONS
What is the output of the following snippet?
T=1
while T:
print(True)
break
Which amongst this is not a jump statement?
Which punctuation should be used in the blank?
if<condition>_
statement-block 1
else:
statement-block 2
List the control structures in Python.
Define control structure.
Write a note on if..else structure.
Using if..else..Elif statement writes a suitable program to display the largest of 3 numbers.
Write a detail note on for loop?
Write a program to display all 3 digit odd numbers.
Write a program to display a multiplication table for a given number.
