Difference python-continue and break the

continue
out of this cycle, the next cycle continues

break
ends the current cycle

for i in range(10):
print('------',i)
for j in range(10):
print(j)
if j > 5:
break

Guess you like

Origin www.cnblogs.com/peiya/p/11970727.html