今天找了python如何跳出两层for循环
for i in xrange(N):
for j in xrange(M):
if something:
break
else:
continue
break
A break statement executed in the first suite terminates the loop without executing the else clause’s suite.官方文档