I have the following:
[[1, 2], [3], [4,5], [6,1], [5,3,4], [4,7]]
I'm trying to combine these so that if a number is in another array, I combine the arrays. The output should be this:
[[1,2,6],[3,4,5,7]]
Any ideas on how I can do this in Python?