How to | Combine and Rearrange Lists

The Wolfram System provides a complete data manipulation language with vast flexibility in rearranging lists with any number of elements in any kind of structure.

Set up a list of six integers with some duplicates (stored as v):

Sort the elements of the list v:

Use Union to sort v and remove any duplicates:

Note that unless you redefine v, it retains its original value:

Redefine v:

Reverse the order of v:

Rotate the elements of v two places to the left:

Rotate the elements of v two places to the right:

Pad v on the left with x to get a list of length 10:

Partition the list v into sublists of length 2:

Partition the list v into sublists of length 2 with offset 1:

Split a list into runs of identical elements:

Flatten deletes inner braces in nested lists:

Join the elements of a set of lists: