ContainsExactly

ContainsExactly[e1,e2]

yields True if e1 contains exactly the same elements as e2.

ContainsExactly[e2]

is an operator form that yields True when the object to which it is applied contains exactly the same elements as e2.

Examples

open allclose all

Basic Examples  (2)

Both lists contain exactly the same elements:

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

The lists contain different elements:

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

Scope  (4)

Options  (2)

Properties & Relations  (3)

See Also

ContainsAll  ContainsNone  ContainsAny  MemberQ  FreeQ  Complement  Intersection

Introduced in 2015
(10.2)