I have a list below:
a = [ [8, 12], [13, 9], [2, 5], [1, 10], [13, 13] ]
How do I find 5 of a[2][1]. I want to find the minimum value of second element of the sub-list.
This is my code:
min = a[0][1]
for i in range(len(a)):
temp = a[i][1]
if temp < min:
min = temp
What is a good way (with fewer lines of code) to implement this code?