Question: Write a function that merges two sorted lists #into a single sorted list list1 = [ 1, 8, 3, 4 ] list2 = [ 5,
Write a function that merges two sorted lists #into a single sorted list
list1 = [ 1, 8, 3, 4 ]
list2 = [ 5, 2, 6, 7 ]
i =0
j=0
def merge_list(list1,list2):
list1.append(i) list2.append(j)
new = merge_list(list1,list2)
print("Sort list is:",new)
new.sort
i need help it doesnt work output is the sorted list s is none!!!!!!!!!!!!!!!!! pythooon
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
