IntersectingQ

IntersectingQ[list1,list2]

yields True if list1 and list2 have at least one element in common, and False otherwise.

Details

Examples

Basic Examples  (1)

Test whether lists share any elements:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

See Also

DisjointQ  Complement  Intersection  Union  ContainsAny

Introduced in 2014
(10.0)