6-задание выполнено
This commit is contained in:
@@ -7,16 +7,12 @@ def merge_sorted_lists(collection1, collection2):
|
||||
break
|
||||
else:
|
||||
result_collection.append(value2)
|
||||
print(result_collection)
|
||||
result_collection.extend(collection1)
|
||||
print(result_collection)
|
||||
result_collection.sort()
|
||||
print(result_collection)
|
||||
|
||||
return result_collection
|
||||
|
||||
# Пример использования:
|
||||
list1 = [1, 3, 5, 7, 9, 5]
|
||||
list1 = [1, 3, 5, 7, 9]
|
||||
list2 = [2, 4, 5, 6, 8, 10]
|
||||
merged = merge_sorted_lists(list1, list2)
|
||||
print(merged)
|
||||
Reference in New Issue
Block a user