I have data in the following form
data = [["one", 1], ["three", 3], ["two", 2]]
From this list, I want to find the sub-list where the second item is maximum.
I can do this like so:
max_i = max([i[1] for i in data])
[i for i in filter(lambda i: i[1] == max_i, data)][0]
But this doesn't seem very elegant syntax. Is there a better way with clearer syntax?