I've been trying to figure something out, easiest way to explain is using an example:
a = [[1, 2, 4], [2, 5], [0, 3, 7, 8], [12, 3, 6], [18, 14]]
This is the kind of list I start from. I need to end up with a list that contains lists of all the lists in a that contain overlapping elements added together.
result = [[1, 2, 4, 5], [0, 3, 6, 7, 8, 12], [14, 18]]
How would I go about this?
Kind regards, Daquicker