「Python」for文で配列と文字列の要素を取り出すサンプル
1.配列
cft = ("AA01", "BB02", "CC03") for h in cft: print(h)
結果
AA01
BB02
CC03
2.文字列
cft = "arkgame" for a in cft: print(a)
結果
a
r
k
g
a
m
e
Coding Changes the World
1.配列
cft = ("AA01", "BB02", "CC03") for h in cft: print(h)
結果
AA01
BB02
CC03
2.文字列
cft = "arkgame" for a in cft: print(a)
結果
a
r
k
g
a
m
e