# Length of a list (length)

Number of elements in a list.

## How to write it

### length(list)

**list**

The list. Takes a list.

## Examples

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

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

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

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

## Related functions

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

  A list of the arguments.
- [last](https://hilberon.com/library/last)

  The last element of a list.
- [map](https://hilberon.com/library/map)

  Apply a function to every element of a list.
- [join](https://hilberon.com/library/join)

  Join lists into one.
- [map_thread](https://hilberon.com/library/map_thread)

  Apply a function to corresponding elements of several lists.
- [intersection](https://hilberon.com/library/intersection)

  The elements that are in every one of some lists.

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