I got this list of list of list
A=[[[0, 'a'], [2, 'g'], [9, 'Q'], [12, 'front'], [0, 'Z'], [0, 'w'], [2, 'front'], [0, 'Z']], [[2, 'a'], [0, 'c'], [0, 'g'], [15, 'w'], [2, 'Q'], [12, 'front'], [0, 'Z'], [2, 'front'], [0, 'Z']]
and in each list of list there are lists with similar alphabets.In this example,it is 'front'.I want to remove the list with similar alphabets,keeping the one with the larger number and removing the one with a smaller number.
Output should be like:
A=[[[0, 'a'], [2, 'g'], [9, 'Q'], [12, 'front'], [0, 'Z'], [0, 'w'], [0, 'Z']], [[2, 'a'], [0, 'c'], [0, 'g'], [15, 'w'], [2, 'Q'], [12, 'front'], [0, 'Z'],[0, 'Z']]
Order doesn't matter