Remove elements when satisfying certain condition

Viewed 173

I have a large list:

a=[[4,34,1], [5,87,2], [2,76,9],...]

I want to compare all pairs of sub-lists, such that if

a[i][0]>a[j][0] and a[i][1]>a[j][1]

then the sub-list a[i] should be removed. How could I achieve this goal in Python 2.7?

3 Answers
Related