Wolfram Language & System 10.4 (2016)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

ContainsOnly

ContainsOnly[e1,e2]
yields True if contains only elements that appear in .

ContainsOnly[e2]
is an operator form that yields True when the object to which it is applied contains only elements that appear in .

ExamplesExamplesopen allclose all

Basic Examples  (2)Basic Examples  (2)

The first list contains only elements in the second list:

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

The first list contains elements not present in the second list:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 2015
(10.2)