(Merge two sorted lists) Write the following method that merges two sorted lists into a new sorted list: code example
Example 1: merge two sorted lists python
from heapq import merge
test_list1 = [1, 5, 6, 9, 11]
test_list2 = [3, 4, 7, 8, 10]
print ("The original list 1 is : " + str(test_list1))
print ("The original list 2 is : " + str(test_list2))
res = list(merge(test_list1, test_list2))
print ("The combined sorted list is : " + str(res))
Example 2: merge two sorted list in python
sorted(l1+l2)