Lists are compared using lexicographic order 1 (i.e., the first elements are compared, then the second, then the third, etc.), therefore simply because list_a < list_b does not mean that the smallest element in list_a smaller than the smallest element in list_b , therefore your approach does not work in the general case.
For example, consider the following:
>>> l1 = [3, 0] >>> l2 = [2, 1] >>> >>> min(l1, l2) [2, 1]
The reason for min(l1, l2) is [2, 1] , because the first element l1 ( 3 ) is initially compared with the first element l2 ( 2 ). Now 2 < 3 , so l2 returns at least without any additional comparisons. However, it l1 does contain the smallest number from both lists ( 0 ) that occurs after the starting element. Therefore, taking min of min(l1, l2) , we get the wrong result 1 .
A good way to solve this problem would be to find the minimum "flattened" list that can be obtained using the generator:
>>> Q = [[8.85008011807927, 4.129896248976861, 5.556804136197901], ... [8.047707185696948, 7.140707521433818, 7.150610818529693], ... [7.5326340018228555, 7.065307672838521, 6.862894377422498]] >>> >>> min(a for sub in Q for a in sub)
(+ 1 to @Ffisegydd for posting a decision on these lines in the first place.)
1 From http://docs.python.org/3/tutorial/datastructures.html#comparing-sequences-and-other-types :
Sequence objects can be compared with other objects with the same type of sequence. The comparison uses lexicographical ordering: first, the first two elements are compared, and if they differ from each other, this determines the result of the comparison; if they are equal, the following two elements are compared, and so on, until any sequence is exhausted. If the two elements to be compared are themselves sequences of the same type, the lexicographic comparison is performed recursively. If all elements from two sequences are compared equal, the sequences are considered equal. If one sequence is the initial subsequence of another, the shorter sequence is the smaller (smaller) one.