l1=[[1,2,3],[1,7,8,9],[1,10,11,12]]
l2=[[4,5,6,2],[6,18],[6,10,11,18]]
l=[]
#得到 l1、l2的交集
for i in l1:
for j in l2:
if list(set(i) & set(j)):
print list(set(i) & set(j))
l2=[[4,5,6,2],[6,18],[6,10,11,18]]
l=[]
#得到 l1、l2的交集
for i in l1:
for j in l2:
if list(set(i) & set(j)):
print list(set(i) & set(j))
#输出结果:
[2]
[10, 11]