4
3

More than 3 years have passed since last update.

【Python】リストの値を順番に出力する方法

Last updated at Posted at 2019-11-21

サンプルコード

(追記: 2019年11月22日 20時15分)
@kaizen_nagoyaさんにコメントでご指摘いただいた方法に修正しました。

l = [1, 2, 3, 4, 5]

print(*l, sep='\n')
# => 1
#    2
#    3
#    4
#    5

参考

4
3
4

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
4
3