You are an intern at GUVI and the company wants to organise its data and delete unnecessary extra storage elements used. You are given k arrays of unequal dimensions. Sort the k arrays individually and concatenate them.
Input Description:
First line contains the number of arrays. Subsequent lines contain the size of the array followed by the elements of the array.
Output Description:
An array containing the sorted elements of k sorted arrays
Sample Input :
3
2
98 12
6
1 2 3 8 5 9
1
11
Sample Output :
12 98 1 2 3 5 8 9 11
my code is:
k = input()
A = input()
a = input().split()
x = str(sorted(a))
B = input()
b = input().split()
y = str(sorted(b))
C = input()
c = input().split()
z = str(sorted(c))
N = (x + y + z)
print(N)
the output is :
['12', '98']['1', '2', '3', '5', '8', '9']['11']
i want the numbers with only space seperated.
i have tried join. it is not working
kindly provide me the correct syntax