This is the program I have to sort my list is
sorted_PC = sorted(PC, key=lambda x: x[1])
print(sorted_PC[0])
However, when I run it the final output is not the largest value like I am looking for, sorted by the second column of the array.
Edit: The final output should be the model name of the highest scoring PC, so I would like sorted() to sort the values in ascending order by the second column
So this [['lynx', 15.364583333333332], ['highest', 100], ['9', 82.03125], ['6', 67.1875], ['4', 53.125]]
is what the list looks like pre-sort, but ['lynx', 15.364583333333332]
is being output. i would excpect ['highest', 100]
to output