merge two arrays of same size sorted in descending order

 l1=list(map(int,input().split()))

l2=list(map(int,input().split()))

l1.extend(l2)

l1.sort(reverse=True)

print(l1)


Input:

5 1 9 6 7


4 8 3 15 12


Output:


15, 12, 9, 8, 7, 6, 5, 4, 3, 1

No comments:

Post a Comment