h = ['hp','op']
for x in ['POP','PHP','PYTHON']:
for y in h:
if y in x:
continue #如果这个跳出循环 ,下一句就不会print
print x
My understanding is to jump directly out of the outermost for loop, but why is it not like this?
我想大声告诉你2017-06-22 11:54:06
continue
only jump out of the nearest (or innermost) loop , that is, the inner for
.