loop skip in python code example
Example 1: skip to next iteration in for loop python
for i in range(1,11):
if i==5:
continue
print (i)
Example 2: continue in python
# Example of continue loop:
for number is range (0,5):
# If the number is 4, skip the rest of the loop and continue from the top.
if number == 4:
continue
print(f"Number is: {number}")