I'm trying to apply heuristics to a code I've been working on right now, but I need to get the smallest element of a list from a list. example:
L = [[1, 1, 6], [1, 2, 5], [1, 3, 7],
[2, 1, 1], [2, 2, 9], [2, 3, 4],
[3, 1, 5], [3, 2, 2], [3, 3, 3]]
For each of the sub-lists L [] [0] and L [] [1] are x and y coordinates (The first two elements of the sub-lists are x and y), and the L [] [2] ) are the values I need to check. How can I check all sub-lists, and return the lower L [] [2]? That in this example is L [3] [2].