I'm writing a program that merges the values of two arrays, with the same amount of values. The program receives as input the amount of values in each array. It then receives the values and, finally, prints the merged values, as follows:
Entry:
3
2
7
5
9
6
8
Output:
2
9
7
6
5
8
How do I do:
quantidade = int(raw_input())
inicio = 0
lista1 = list()
while inicio < quantidade:
valor = int(raw_input())
inicio = inicio + 1
lista1.append(valor)
My code creates a list of received values, but I do not know how to create the two lists, or how to merge the values. How to proceed?