Merge lists that share common elements
Merge lists that share common elements Question: My input is a list of lists. Some of them share common elements, eg. L = [[‘a’,’b’,’c’],[‘b’,’d’,’e’],[‘k’],[‘o’,’p’],[‘e’,’f’],[‘p’,’a’],[‘d’,’g’]] I need to merge all lists, that share a common element, and repeat this procedure as long as there are no more lists with the same item. I thought about using …
Total answers: 15