Flatten

WMA link


Flatten[expr]

flattens out nested lists in expr.

Flatten[expr, n]

stops flattening at level n.

Flatten[expr, n, h]

flattens expressions with head h instead of List.

Flatten also works in irregularly shaped arrays

DeleteDuplicates
Gather