Python: Extracting matched items between lists
a= [67, 4, 19.2, 3.4, 11, "test"];
b= [3.4, 99, "test", 67, "sample"];
c= list(set(a) & set(b));
print c; # ['test', 67, 3.4]
b= [3.4, 99, "test", 67, "sample"];
c= list(set(a) & set(b));
print c; # ['test', 67, 3.4]
Comments
Post a Comment