前回と似たような課題
https://paiza.jp/works/mondai/stdin_primer/stdin_primer__matrix_data_step4
1 行目で整数 N と整数 M が与えられます。
2 行目以降で N 行 M 列の行列が与えられます。上から i 番目、左から j 番目の整数は >a_{i,j} です。
N 行 M 列の行列をそのまま出力してください。
arr = list(map(int,input().split()))
N = arr[0]
M = arr[1]
arr = []
for i in range(N):
value = list(map(int,input().split(" ")))
arr.append(value)
for i in range(N):
print(*arr[i])
内容としてはこれでOKなんだけど、
最初の部分はもっと簡単にできる方法があるそうだ。
N, M = map(int, input().split())
なるほど〜。これはもっと簡単になった。
覚えておこう。