python go to next iteration code example
Example 1: python get out of loop
while True:
print('I run!')
break
print('Not in loop!')
Example 2: skip to next iteration in for loop python
for i in range(1,11):
if i==5:
continue
print (i)
Example 3: next iteration python
t_ints = (1, 2, 3, 4, 5)
for i in t_ints:
if i == 3:
continue
print(f'Processing integer {i}')
print("Done")