0
0

配列の連結 Python3編

Posted at

extendで連結

N,M = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
A.extend(B)
for i in A:
    print(i)

でも+でできるらしい。。。

N,M = map(int,input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
Ans = A + B
for i in A:
    print(i)

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