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)

KeyComplement

KeyComplement[{assocall,assoc1,assoc2,}]
generates an association in which only elements whose keys appear in but not in any of the are retained.

Details and OptionsDetails and Options

  • KeyComplement preserves the order of the elements in .
  • KeyComplement can be used not only on Association objects, but also on lists of rules.
  • KeyComplement[assocall,assoc1,,SameTest->test] applies test to each pair of keys of the elements in and the to determine whether they should be considered the same.

ExamplesExamplesopen allclose all

Basic Examples  (1)Basic Examples  (1)

Find a key that is not present elsewhere:

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