Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #DEFINDING NEEDING ARRAY
- list1 = []
- list2 = []
- #INPUT VALUES
- n = int(input('Input the size of 2 arrays: '))
- print('1st array: ')
- for i in range(0,n):
- x = input()
- list1.append(x)
- print('2nd array: ')
- for i in range(0,n):
- x = input()
- list2.append(x)
- #MIX 2 ARRAY
- count = 0
- for i in range(1, n*2, 2):
- pos = (i - count) - 1
- list1.insert(i, list2[pos])
- count +=1
- print(list1)
Advertisement
Add Comment
Please, Sign In to add comment