「python」whileループのサンプル

2021年7月26日

書式
while 条件式:
サンプルコード

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
i = 8
while i < 12:
print(i)
i += 1
i = 8 while i < 12: print(i) i += 1
i = 8
while i < 12:
  print(i)
  i += 1

結果
8
9
10
11

Python

Posted by arkgame