当试图在setOfsets中找到集合的交集时,会出现下面提到的错误。示例setA = ['1','2‘’,'2,3',‘2’‘,'4'] return set.intersection(*sets)
except TypeError: # this is Python < 2.6 or no argumentsa_
没有提到Python上的multiple-sets intersection的平均情况复杂性:
(n-1)*O(l) where l is max(len(s1),..set.intersection(s1,s2,s2,s4 ...sn)2-集交集:O(len(s) * len(t))多集交集:(n-1)*O(l