gk nxt python book

Difference between break and continue in Python

python interview questions
Free Python Book
Python Documentation PDF
Free Python Course
Difference between continue and break
    break
    • break forces the execution to exit or “break” the loop in which it is present      
    • break forces the execution to jump out of the closest enclosing loop
    • The break statement terminates the loop containing it. Control of the program flows to the statement immediately after the body of the loop. If it is inside a nested loop (loop inside another loop), break will terminate the innermost loop
    continue
    • continue forces the control to skip the rest of the code for the current iteration and continues with the next iteration/code
    • continue forces the execution to jump to the top of the closest enclosing loop
    • The continue statement is used to skip the rest of the code inside a loop for the current iteration only. The continue statement does not terminate the loop if there is a next iteration as per the loop condition            
    python interview questions
    Free Python Book
    Python Documentation PDF
    Free Python Course
GKNXT Encyclopedia
0 A B C D E
F G H I J K
L M N O P Q
R S T U V W
X Y Z #
colors list
Collective Nouns List
Top 10 Lists
World Flags