repl.it
@MerlinKnight/

Joining two lists

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
18
list1 = [2,5,15,36,47,56,59,78,156,244,268]
list2 = [18,39,42,43,66,69,100]
mergelist = []

for x in range(len(list1)):
  mergelist.append(list1[x])
for x in range(len(list2)):
  mergelist.append(list2[x])
mergelist.sort()

print("List1:")
print(list1)
print(" ")
print("List2:")
print(list2)
print(" ")
print("Mergelist:")
print(mergelist)
Fetching token
?