phyton continue code example
Example 1: python continue
for i in range(10):
if i == 3: # skips if i is 3
continue
print(i)
Example 2: how to break a loop in python
x = 0
while True:
x += 1
if x == 10:
break
for i in range(10):
if i == 3: # skips if i is 3
continue
print(i)
x = 0
while True:
x += 1
if x == 10:
break