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

Home Python Keywords

whileの例1

Print x as long as x is less than 9:

    x = 0while x < 9:  print(x)  x = x + 1

whileの定義及び使い方

while関数は、 whileループ。 whileループは、文がfalseになるまで続きます。

Related Pages Use the for keyword to create a for loop. Use the break keyword to break out of a loop. Read more about while loops in our Python While Loops Tutorial.

Home Python Keywords

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