Hi all,
I am hoping you can help me.
I have a data structure which consists of a game players name and their scores, I have use lists within lists (2D):
results = [["Ben", 15, 18,25, 6, 9], ["George", 25, 35, 85, 12, 9], ["Evie", 2, 54, 84, 62,18]]
What I want to do is sort the list in alphabetical order with each players highest score.
I know how to sort by specifying a specific index using Itemgetter, but unsure of how to do this by looking at all a players scores over the five attempts and then displaying the highest score.
How would I go about doing this.....
Thanks in advance
I am hoping you can help me.
I have a data structure which consists of a game players name and their scores, I have use lists within lists (2D):
results = [["Ben", 15, 18,25, 6, 9], ["George", 25, 35, 85, 12, 9], ["Evie", 2, 54, 84, 62,18]]
What I want to do is sort the list in alphabetical order with each players highest score.
I know how to sort by specifying a specific index using Itemgetter, but unsure of how to do this by looking at all a players scores over the five attempts and then displaying the highest score.
How would I go about doing this.....
Thanks in advance
Comment