Mathematica 9 is now available
 Documentation /  Mathematica /  The Mathematica Book /  A Practical Introduction to Mathematica /  Lists /

Adding, Removing and Modifying List ElementsAdvanced Topic: Lists as Sets

1.8.7 Combining Lists

Functions for combining lists.

Join concatenates any number of lists together.

In[1]:= Join[{a, b, c}, {x, y}, {c, {d, e}, a}]

Out[1]=

Union combines lists, keeping only distinct elements.

In[2]:= Union[{a, b, c}, {c, a, d}, {a, d}]

Out[2]=

Adding, Removing and Modifying List ElementsAdvanced Topic: Lists as Sets



Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.