📜  如何在 python 中重复代码直到满足条件 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:45.386000             🧑  作者: Mango

代码示例1
a = 1
b = 1
while (a<10):
  print ('Iteration',a)
  a = a + 1
  b = b + 1
  if (b == 4):
    break
print ('While loop terminated')