Wolfram Language & System 10.3 (2015)|Legacy Documentation

This is documentation for an earlier version of the Wolfram Language.View current documentation (Version 11.2)

Combining Lists

Join[list1,list2,]concatenate lists together
Union[list1,list2,]combine lists, removing repeated elements and sorting the result
Riffle[list1,list2]interleave elements of and

Functions for combining lists.

Join concatenates any number of lists together.
In[1]:=
Click for copyable input
Out[1]=
Union combines lists, keeping only distinct elements.
In[2]:=
Click for copyable input
Out[2]=
Riffle combines lists by interleaving their elements.
In[3]:=
Click for copyable input
Out[3]=