continue is a keyword in python just like another programming language and it is used to send the program’s section to loop by escaping the execution of next statement in the loop.
Example 2: In this example, we are printing character by character of the value/string “Hello world” and continuing the loop execution, if the character is space.
for ch in "Hello world":
if ch == " ":
continue
print(ch)
Example 1:
Output
Example 2: In this example, we are printing character by character of the value/string “Hello world” and continuing the loop execution, if the character is space.
Output
need an explanation for this answer? contact us directly to get an explanation for this answer