Python Question Got List Elementstemp 8 7 5 5 9 6 10 5 11 4 12 3 13 2 8 8 Want Remove Elem Q37267314

This is a python question:I got a list of elementstemp = [[8,7],[5,5],[9,6],[10,5],[11,4],[12,3],[13,2],[8,8]]

And I want to remove elements that are strictly inferior toother elements, such as [5,5] (strictly inferior to [10,5] , [8,7],etc) and [8,7] (strictly inferior to [8,8]).
I can solve this by using plenty of for-loops, but how should I dothis efficiently?


Answer


Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.