repl.it
@druceb/

Task 3

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
list1 = [2,5,15,36,47,56,59,78,156,244,268]
list2 = [18,39,42,43,66,69,100]
mergeList = []
index = 0
index2 = 0
while len(mergeList) != (len(list1)+len(list2)):
  print(index)
  if list1[index] > list2[index2]:
    mergeList.append(list2[index2])
    #index2 += 1
    index += 1
  else:
    mergeList.append(list1[index])
    index2 += 1
  print(mergeList)

print(mergeList)
Fetching token
?