Hey i need some help regarding list of list. For example i have a list :
parentList = [[["69", "742", "180","760", "05.07.2007", ""],
["69"," 768", "180", "785", "05.07.2007", ""],
["69", "794","180","811","05072007",""],
["69", "768", "180","785", "05.07.2007", ""]],
[["69", "742", "180", "760", "05.07.2007", ""],
["68", "717", "180", "735", "05.07.2007", ""]]]
Here "parentList" is one list containing multiple sublists
A=[["69", "742", "180","760", "05.07.2007", ""],
["69"," 768", "180", "785", "05.07.2007", ""],
["69", "794","180","811","05072007",""],
["69", "768", "180","785", "05.07.2007", ""]]
and
B= [["69", "742", "180", "760", "05.07.2007", ""],
["68", "717", "180", "735", "05.07.2007", ""]]
I want to merge these two lists of lists within parentList if there is some common list between them. As you can clearly see in the example, that there is one list common in between A and B. I want the output as ```
parentList = [[["69", "742", "180","760", "05.07.2007", ""],
["69"," 768", "180", "785", "05.07.2007", ""],
["69", "794","180","811","05072007",""],
["69", "768", "180","785", "05.07.2007", ""],
["69", "742", "180", "760", "05.07.2007", ""],
["68", "717", "180", "735", "05.07.2007", ""]]]
Note:- there can be multiple sublists in "parentList" with nothing is common to any sublist. Such unique sublists should retain their structure.