I have a list like this:
car_cost = [[carA, 10000], [carB, 20000], [carC, 30000]]
how can I effectively find the element that has the maximum second element?
in this case should be getting a index 2, or the element
[carC, 30000]
I can find the max second element value by
max(car_cost, key = lambda x:x[1])
But I don't know how to do the rest effectively, please show me how can I do this
Thank you very much!!!