You need to match your list to one that contains only the items you care about.
Here is one possible way to do this:
x = [[[5, 5, 3], [6, 9, 7]], [[6, 2, 4], [0, 7, 5]], [[2, 5, 6], [6, 6, 9]], [[7, 3, 5], [6, 3, 2]], [[3, 10, 1], [6, 8, 2]], [[1, 2, 2], [0, 9, 7]], [[9, 5, 2], [7, 9, 9]], [[4, 0, 0], [1, 10, 6]], [[1, 5, 6], [1, 7, 3]], [[6, 1, 4], [1, 2, 0]]] minc = min(l[0][2] for l in x) maxcf = max(l[0][2]+l[1][2] for l in x)
The contents of the min and max calls are what are called the βgeneratorβ , and are responsible for creating a mapping from the source data to the filtered data.