Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica > Rearranging & Restructuring Lists >

Complement

Complement[eall, e1, e2, ...]
gives the elements in eall which are not in any of the ei.
  • 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.
Find which elements in the first list are not in any of the subsequent lists:
In[1]:=
Click for copyable input
Out[1]=
New in 1 | Last modified in 3
© 2008 Wolfram Research, Inc. japanese.gif
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team