break : 立即終止迴圈。 for i in range(10):. if i == 5: break. print ... 你可以在一個迴圈內使用另一個迴圈,稱為巢狀迴圈。 for i in range(3):.
確定! 回上一頁