Here is how my dictionary looks like:
{((0,), (16,)): 12.0, ((0,), (17,)): 14.0, ((1,), (16,)): 10.0, ((1,), (17,)): 13.0, ((2,), (15,)): 9.0, ((2,), (16,)): 21.0, ((2,), (17,)): 42.0, ((3,), (16,)): 13.0, ((3,), (17,)): 21.0, ((4,), (16,)): 9.0, ((4,), (17,)): 12.0, ((8,), (15,)): 7.0, ((8,), (16,)): 16.0, ((8,), (17,)): 20.0, ((9,), (16,)): 9.0, ((9,), (17,)): 13.0, ((10,), (15,)): 10.0, ((10,), (16,)): 18.0, ((10,), (17,)): 35.0, ((11,), (15,)): 10.0, ((11,), (16,)): 20.0, ((11,), (17,)): 37.0, ((12,), (15,)): 8.0, ((12,), (16,)): 16.0, ((12,), (17,)): 21.0, ((13,), (15,)): 7.0, ((13,), (16,)): 20.0, ((13,), (17,)): 25.0, ((14,), (16,)): 8.0, ((14,), (17,)): 8.0}
I'm trying to sort the dictionary based on the recommendation here:
sorted_items = [i[0] for i in sorted(sorted_items.items(),
key=lambda kv: (kv, -kv[0][0], -kv[1][0]),
reverse=True)]
This is the error I get:
TypeError: bad operand type for unary -: 'tuple'
How do i address this?