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?
小伙看你根骨奇佳,潜力无限,来学PHP伐。
continue only jump out of the nearest (or innermost) loop , that is, the inner for.
continue
for
continue
only jump out of the nearest (or innermost) loop , that is, the innerfor
.