C语言 goto, return等跳转 Please don't fall into the trap of believing that I am terribly dogmatical about [the go to statement]. I have the uncomfortable feeling that others are making a religion out of it, as if the conceptual problems of programming cou…
continue: def func(): for i in range(1,11): if i % 2 == 0: continue # 作用是当符合上面的if判语句后,就直接跳过之后的语句,也就是不执行print(i) print (i) func() # 输出的结果是:1,3,5,7,9 break def func1(): for i in range(1,11): if i % 2 == 0: break # 作用是不满足if语句后,直接执行print(i) print (i) fun…