This is documentation for Mathematica 7, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

DeleteDuplicates

DeleteDuplicates[list]
deletes all duplicates from list.
DeleteDuplicates[list, test]
applies test to pairs of elements to determine whether they should be considered duplicates.
  • DeleteDuplicates[list] deletes all but the first occurrence of each distinct element that appears in list.
Delete duplicated elements:
Delete duplicated elements:
In[1]:=
Click for copyable input
Out[1]=
Delete sublists that have the same total:
DeleteDuplicates is similar to Union without sorting:
Avoiding the sort improves the speed substantially:
New in 7