# constant_array 函数

由某个值的若干副本组成的列表。

## 怎么写

### constant_array(x, n)

**x**

该值。接受一个表达式。

**n**

副本数量。接受一个整数。

## 示例

- $\displaystyle \operatorname{constant\_array}(0, 3) = \left[ 0, 0, 0 \right]$

  `constant_array(0, 3)`

  在求解器中，`constant_array(0, 3)` 的结果是 `[0, 0, 0]`。

  [在求解器中打开](https://zh.hilberon.com/?q=constant_array%280%2C%203%29)

## 相关函数

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

  列表中有多少个元素等于某个值。
- [complement](https://zh.hilberon.com/library/complement)

  某个列表中不在其他任何列表里的元素。
- [dimensions](https://zh.hilberon.com/library/dimensions)

  列表或矩阵的大小，逐层给出。
- [apply](https://zh.hilberon.com/library/apply)

  把表达式的头部或列表的括号替换为函数。
- [drop](https://zh.hilberon.com/library/drop)

  去掉开头若干元素后的列表。
- [append](https://zh.hilberon.com/library/append)

  在末尾添加一个元素后的列表。

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