Python Leave Loop Early

后端 未结 4 2230
执念已碎
执念已碎 2020-12-11 00:10

How do I leave a loop early in python?

for a in b:
    if criteria in list1:
        print \"oh no\"
        #Force loop i.e. force next iteration without go         


        
4条回答
提交回复
热议问题