Consider the example:
a = [[95.958, 101.566], [117.665, 121.995], [138.909, 153.961],
[154.529, 252.391], [229.633, 232.087], [268.995, 269.266],
[269.432, 283.028], [286.432, 364.575], [366.179, 437.013],
[446.27, 601.232], [585.713, 1374.37], [1287.678, 2464.882],
[2273.926, 5218.017]]
Based on the above array elements
[446.27, 601.232], [585.713, 1374.37],
[1287.678, 2464.882], [2273.926, 5218.017]
These overlap with each-other. So to from an non-overlapping range these elements become a single element
[446.27, 5218.017]
so the final array will become
a = [[95.958, 101.566], [117.665, 121.995], [138.909, 153.961],
[154.529, 252.391], [229.633, 232.087], [268.995, 269.266],
[269.432, 283.028], [286.432, 364.575], [366.179, 437.013],
[446.27,5218.017]]
if anyone could suggest a code to do this in python it will be helpful?