skip item in for loop python if error 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: how to end a loop in python
#the loop
for x in (1, 10, 1):
#type break to end loop before loop stops
break