# append function

A list with an element added at the end.

## How to write it

### append(list, x)

**list**

The list. Takes a list.

**x**

The element to add. Takes an expression.

## Examples

- $\displaystyle \operatorname{append}(\left[ 1, 2 \right], 3) = \left[ 1, 2, 3 \right]$

  `append([1, 2], 3)`

  In the solver, `append([1, 2], 3)` gives `[1, 2, 3]`.

  [Open in the solver](https://hilberon.com/?q=append%28%5B1%2C%202%5D%2C%203%29)

## Related functions

- [apply](https://hilberon.com/library/apply)

  Replace the head of an expression, or the brackets of a list, with a function.
- [accumulate](https://hilberon.com/library/accumulate)

  Running totals of a list.
- [complement](https://hilberon.com/library/complement)

  The elements of a list that are in none of the others.
- [union](https://hilberon.com/library/union)

  The elements in any of some lists, each once, in order.
- [constant_array](https://hilberon.com/library/constant_array)

  A list of copies of a value.
- [total](https://hilberon.com/library/total)

  Sum of the elements of a list.

---
Source: https://hilberon.com/library/append
