# drop 函数

去掉开头若干元素后的列表。

## 怎么写

### drop(list, n)

**list**

列表。接受一个列表。

**n**

要略去的元素个数。接受一个整数。

## 示例

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

  `drop([1, 2, 3, 4], 2)`

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

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

## 相关函数

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

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

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

  把嵌套列表展平为一个列表。
- [count](https://zh.hilberon.com/library/count)

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

  从左侧开始，用函数把列表的元素逐步结合，并从某个值出发。
- [constant_array](https://zh.hilberon.com/library/constant_array)

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

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