Task
You are given two integer arrays of size X and X ( &  are rows, and  is the column). Your task is to concatenate the arrays along axis .
Input Format
The first line contains space separated integers  and .
The next  lines contains the space separated elements of the  columns.
After that, the next  lines contains the space separated elements of the  columns.
Output Format
Print the concatenated array of size X.

hackerrank concatenate problem solution in python programming

Problem solution in Python 3 programming language.

import numpy

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

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

Second solution

import numpy as np
a, b, c = map(int,input().split())
arrA = np.array([input().split() for _ in range(a)],int)
arrB = np.array([input().split() for _ in range(b)],int)
print(np.concatenate((arrA, arrB), axis = 0))

Problem solution in Python 2 programming language.

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)