LoginSignup
1
1

More than 5 years have passed since last update.

文字列の配列をfor文で回す(Python3)

Last updated at Posted at 2017-07-28

こういう基本的なことが意外と見つからなかったのでメモ

data = ["hoge", "fuga"]

for i in range(len(data)):
    print(data[i])

追記
こちらの方が一般的だそうです><
HigashinoSolaさんありがとうございます

data = ["hoge", "fuga"]

for s in data:
    print(s)
1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1