Avatar ·

Synchronous sorting of Python lists

📁 Advanced Python Topics

There are two chairs lists a and b

We need to synchronously sort them by list a, i.e. the first element of list a corresponds to the first element of list b, etc.

a = [3, 1, 2]b = ['a', 'b', 'c']...a1 = [1, 2, 3]b1 = ['b', 'c', 'a']