I am working with a list of lists where some items have overlapping values.
list=[[7, 11, 'Feature01'],
[2, 6, 'Feature02'],
[31, 59, 'Feature03'],
[31, 41, 'Feature04'],
[20, 40, 'Feature05'],
[25, 30, 'Feature06']
For example, in the below items Feature04 lies inside Feature03 coordinates.
[31, 59, 'Feature03'], [31, 41, 'Feature04'],
Similarly in the below example, Feature06 lies inside Feature05 coordinates.
[20, 40, 'Feature05'], [25, 30, 'Feature06']
I want to retain only one item in such an overlapping scenario and update the original/master list of lists to save non-overlapping list items.
I found almost similar question but could not get it to work.