Python: sort an array of dictionaries with custom comparator?

后端 未结 8 1221

I have the following Python array of dictionaries:

myarr = [ { \'name\': \'Richard\', \'rank\': 1 },
{ \'name\': \'Reuben\', \'rank\': 4 },
{ \'name\': \'Reece\'         


        
8条回答
提交回复
热议问题