繰り返し処理
while
value = 1
while value < 5:
print(value)
value += 1
実行結果
1
2
3
4
for
for index in range(5):
print(index)
for char in "value":
print(char)
実行結果
v
a
l
u
e
value = 1
while value < 5:
print(value)
value += 1
実行結果
1
2
3
4
for index in range(5):
print(index)
for char in "value":
print(char)
実行結果
v
a
l
u
e