给出一个包含不同长度列表的数据集,类似于以下示例:pairwise comparisons within a dataset
更多上下文:Given a set of update requests for a table how can I use this to split requests?
我希望输出一组成对的不相交集,这样,如果您合并所有字段,它们将是唯一的(我不确定,该输出的术语成对不相交是正确的。)
for example input,
[1,2,5,6,8]
[4,5,7,9]
[10,11]
[23,45]
can give an output of
[1,2,4,5,6,7,8,9] -- is combined as 5 is common.
[10,11]
[23,45]
我尝试了此操作:Find in python combinations of mutually exclusive sets from a list's elements,但是它不能满足我的需要。