forによる反復処理
![](http://www.mk1131.com/wp-content/uploads/2020/02/2017-02-07_161952_GX1-1024x768.jpg)
普通の流ループ処理
rabbits = ['Flopsy', 'Mopsy', 'Cottontail', 'Peter']
current = 0
while current < len(rabbits):
print(rabbits[current])
current += 1
結果
Flopsy
Mopsy
Cottontail
Peter
Pythonらしコード
rabbits = ['Flopsy', 'Mopsy', 'Cottontail', 'Peter']
for rabbit in rabbits
print(rabbit)
結果
Flopsy
Mopsy
Cottontail
Peter