>>> a
{'a': [1, 3], 'b': [2, 4]}
>>> a.items()
[('a', [1, 3]), ('b', [2, 4])]
>>> sorted(a.items(),key=lambda x:x[1][2])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <lambda>
IndexError: list index out of range
>>> sorted(a.items(),key=lambda x:x[1][1])
[('a', [1, 3]), ('b', [2, 4])]
>>> sorted(a.items(),key=lambda x:x[1][1],reverse=True)
[('b', [2, 4]), ('a', [1, 3])]
>>>