Sunday, December 22, 2019

Concatenate - Hacker Rank Solution

Two or more arrays can be concatenated together using the concatenate function with a tuple of the arrays to be joined:

Concatenate - Hacker Rank Solution

import numpy

N, M, P = map(int, raw_input().split())
array_1 = numpy.array([ map(int, raw_input().split()) for i in range(N) ])
array_2 = numpy.array([ map(int, raw_input().split()) for i in range(M) ])

print numpy.concatenate((array_1, array_2), axis = 0)

No comments:

Post a Comment

Powered by Blogger.