Python continues articulation example: Here, we will figure out how to utilize continue proclamation in the circles in Python?
continue is a catchphrase in python simply like another programming language and it is utilized to send the program’s segment to circle by getting away from the execution of next articulation tuned in.
In the given example, the circle is running from 1 to 10 and we are utilizing the continue explanation if the estimation of ‘I’ is 6. This when the estimation of I will be 6, the program’s execution will continue without prating the 6.
Example:
for i in range(1,11):
if(i==6):
continue
print(i)
Output:
1
2
3
4
5
7
8
9
10
Example 2: In this example, we are printing character by character of the worth/string “Hi world” and proceeding with the circle execution, if the character is space.
for ch in "Hello world":
if ch == " ":
continue
print(ch)
Output:
H
e
l
l
o
w
o
r
l
d