1 for a in [1,2,3,4,5]: 2 3 for b in [1,2,3]: 4 if a == b: 5 print("a = b = %s" % a) 6 break # 退出本次for循环,执行第一行的for循环 7 else: 8 print("a = %s" % a) 9 continue # 继续执行第一行的for循环 10 print("结束")a = b = 1a = b = 2a = b = 3a = 4a = 5结束