LoginSignup
0
0

More than 1 year has passed since last update.

paizaラーニング「二次元配列の出力 Python3編」

Last updated at Posted at 2022-12-28

前にも同じ問題があったので、私の解答は省略しました。

解答例だけ異なったので、記録に残すことにしました。

解答例

n, k = map(int, input().split())
a = [input().split() for _ in range(n)]

for i in range(n):
    for j in range(k):
        if j == k - 1:
            print(a[i][j])
        else:
            print(a[i][j], end=" ")
0
0
0

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
0
0