什么时候num+=1放print前什么时候放之后啊?
s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' num = 1 for ch in s: if num < 10: num = num + 1 continue # 当num < 10时,跳过后续循环代码,继续下一次循环 print(ch) num = num + 1 #再像这一个 num = 0 num = 0 while num <= 1000: num = num + 1 if num % 2 == 1: continue sum = sum + num print(sum)