我有一段基本的编码如下:
dict1 = [{"Name":"Ron","one":3,"two":6,"three":10}
,{"Name":"Mac","one":5,"two":8,"three":0}
,{"Name":"DUDE","one":16,"two":9,"three":2}]
print(dict1)
import operator
dict1.sort(key=operator.itemgetter("Name"))
print("\nStudents Alphabetised\n")
for pupil in dict1:
print ("StudentName",pupil["Name"],pupil["one"],pupil["two"],pupil["three"])
我已经对其进行了整理,因此它会按字母顺序打印出人们的姓名,但是,我现在需要代码工作,以便它可以按字母顺序打印出姓名,而且它也只打印出最高分。