1分で学ぶPython|continueの使い方

Home Python Keywords

continueの例

Skip the iteration if the variable i is 3, but continue with the next iteration:

    for i in range(9):  if i == 3:    continue  
    print(i)

continueの定義及び使い方

continue関数は、 forループ (またはwhileループ)、次のループに進みます。 反復。

continueの例

Use the continue keyword in a while loop:

    i = 0while i < 9:  i += 1  if i == 3:    
    continue  print(i)

Related Pages Use the break keyword to end the loop completely. Read more about for loops in our Python For Loops Tutorial. Read more about while loops in our Python While Loops Tutorial.

Home Python Keywords

Last Updated: 7/27/2019, 11:23:37 AM