「python入門」for文で配列の要素を1つずつ表示するサンプル
サンプルコード
cityList = [“oosaka", “tokyo", “fukuoka","shanghai","london"]
# 配列の要素を1つずつ表示
for i in range(0, len(cityList)):
print(cityList[i])
# 配列の要素を1つずつ表示
for j in cityList:
print(j)
Coding Changes the World
サンプルコード
cityList = [“oosaka", “tokyo", “fukuoka","shanghai","london"]
# 配列の要素を1つずつ表示
for i in range(0, len(cityList)):
print(cityList[i])
# 配列の要素を1つずつ表示
for j in cityList:
print(j)