# 将两个排好序的列表合并
def merge(list1, list2):
list3 = []
while len(list1) > 0 and len(list2) > 0:
if list1[0] < list2[0]:
list3.append(list1[0])
del list1[0]
else:
list3.append(list2[0])
del list2[0]
list3.extend(list1)
list3.extend(list2)
return list3
ret = merge([1, 2, 3], [0, 2, 3, 4, 5])
print(ret)