i have a list which have element as a student registration number and i have two dictionaries with the same student registration number and thier values are the student avg grades and the student surname and name i need a sorted list which sort the student registration number in descending order by average grade and, in case of a tie, in lexicographic order by the student's surname and name, finally registration number in ascending order for example
my_dict_1 = {'1882282': 29.4, '1675598': 29.125, '1659373': 29.25, '1324812': 30.4} # this is dict with avg grades
my_dict_2 = {'1882282': 'Iacometti Monica', '1675598': "Fiala' Ester", '1659373': "Beudo' Miriam", '1324812': 'Abucar Osman Mariarosaria'} # this is dict_2 with student surname and name
so my return sorted list should be
sorted_list = ['1324812', '1882282', '1659373', '1675598']