Complement

Complement[eall,e1,e2,]

gives the elements in eall that are not in any of the ei.

Details and Options

  • The list returned by Complement is sorted into standard order.
  • Complement[eall,e1,,SameTest->test] applies test to each pair of elements in eall and the ei to determine whether they should be considered the same.

Examples

open all close all

Basic Examples  (1)

Find which elements in the first list are not in any of the subsequent lists:

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

Generalizations & Extensions  (1)

Options  (3)

Applications  (4)

Introduced in 1988
(1.0)
|
Updated in 1996
(3.0)