skip python 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)
while True:
print('I run!')
break
print('Not in loop!')
for i in range(1,11):
if i==5:
continue
print (i)