def merge_two_sort_list(a:list, b:list) ->list:
new_list = []
a_len = len(a)
b_len = len(b)
a_index = 0
b_index = 0
while a_index < a_len and b_index < b_len:
if a[a_index] <= b[b_index]:
new_list.append(a[a_index])
a_index += 1
else:
new_list.append(b[b_index])
b_index += 1
print(new_list)
if a_index < a_len:
new_list.extend(a[a_index:])
if b_index < b_len:
new_list.extend(b[b_index:])
return new_list
if __name__ == '__main__':
a = [3,5,8,9,10]
b = [1,4,7]
c = merge_two_sort_list(a,b)
print(c)