在python中的列表中排序元组

use*_*142 1 python sorting tuples list

我想知道是否有任何简单的方法在python中的列表中排序元组,例如,如果我有一个列表:

list01 = ([a,b,c],[b,a,d],[d,e,c],[a,f,d])
Run Code Online (Sandbox Code Playgroud)

我排序了,我会得到:

([a,b,c],[a,b,d],[c,d,e],[a,d,f])?
Run Code Online (Sandbox Code Playgroud)

甚至:

([a,b,c],[a,b,d],[a,d,f],[c,d,e]) 
Run Code Online (Sandbox Code Playgroud)

如果这更容易

提前Thanx :)

Joh*_*ooy 6

>>> list01 = (['a','b','c'],['b','a','d'],['d','e','c'],['a','f','d'])
>>> map(sorted, list01)
[['a', 'b', 'c'], ['a', 'b', 'd'], ['c', 'd', 'e'], ['a', 'd', 'f']]
>>> sorted(map(sorted, list01))
[['a', 'b', 'c'], ['a', 'b', 'd'], ['a', 'd', 'f'], ['c', 'd', 'e']]
Run Code Online (Sandbox Code Playgroud)