penyortiran-a-python-list-by-two-fields

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