# 列表的长度（Length of a list，length）

列表中元素的个数。

## 怎么写

### length(list)

**list**

该列表。接受一个列表。

## 示例

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

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

  在求解器中，`length([1, 2, 3])` 的结果是 `3`。

  [在求解器中打开](https://zh.hilberon.com/?q=length%28%5B1%2C%202%2C%203%5D%29)

## 相关函数

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

  由参数构成的列表。
- [last](https://zh.hilberon.com/library/last)

  列表的最后一个元素。
- [map](https://zh.hilberon.com/library/map)

  对列表中的每个元素应用一个函数。
- [join](https://zh.hilberon.com/library/join)

  将多个列表合并为一个。
- [map_thread](https://zh.hilberon.com/library/map_thread)

  对多个列表中对应的元素应用一个函数。
- [intersection](https://zh.hilberon.com/library/intersection)

  同时属于若干个列表的所有元素。

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