[SOLVED] Python aggregate lists that share a common item

Issue I’m looking for a function to aggregate lists that have a common item. The specific example I had in mind was the following case: inputs = [[‘a’,’b’], [‘a’,’c’], [‘b’,’d’], [‘e’,’f’], [‘g’,’h’], [‘i’,’k’], [‘k’,’l’]] aggregated_output = [[‘a’,’b’,’c’,’d’],[‘e’,’f’],[‘g’,’h’],[‘i’,’k’,’l’]] as you can

Continue reading