IntersectingQ

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

DetailsDetails

ExamplesExamplesopen allclose all

Basic Examples  (1)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]=
Introduced in 2014
(10.0)