Sorting-A-Python-List-By-Two-Fields

sorted_list = sorted(list, key=lambda x: (x[0], -x[1]))
Inquisitive Ibis