Python 3.6.7
>>> a = [('a',1), ('b', 2), ('c',3), ('d',4)]
>>> b = [('b',2), ('c', 3), ('a',1)]
>>>
>>>
>>> a.sort() == b.sort()
True
>>> a = [('a',1), ('b', 2), ('c',3), ('d',4)]
>>> b = [('b',2), ('c', 3), ('a',1)]
>>>
>>> sorted(a) == sorted(b)
False
>>>
我期望sort()返回false。造成这种行为的排序和排序之间有什么区别。