# Appending an element at the end of a list: append

### 5.40.11 Appending an element at the end of a list: append

The append command adds an element to the end of a list.

- append takes two arguments:
  - L, a list.
  - x.
- append(L,x) returns a list L with the additional element x at the end.

#### Examples.

- Input:
  append([3,4,2],1)
  Output:

  ⎡ ⎣ | 3,4,2,1 | ⎤ ⎦

- Input:
  append([1,2],[3,4])
  Output:

  ⎡ ⎣ | 1,2, | ⎡ ⎣ | 3,4 | ⎤ ⎦ | ⎤ ⎦