Sorting a dictionary of tuples in Python,b.sort(key=lambda x: x[1][2])