Answers for "how to sort two lists in python"

2

sort two lists by one python

list1 = [3,2,4,1,1]
list2 = ['three', 'two', 'four', 'one', 'one2']
list1, list2 = zip(*sorted(zip(list1, list2)))
Posted by: Guest on October-15-2020
0

merge sort of two list in python

a=[2,4,1,4]
b=[0,2,3,4]
a.extend(b)
a.sort()
print(a)
Posted by: Guest on September-13-2021

Code answers related to "how to sort two lists in python"

Python Answers by Framework

Browse Popular Code Answers by Language