delete_first 函数
从列表中移除指定元素的第一次出现。
语法
delete_first(item, list)remove_first(item, list)
参数与选项
item | 要移除一次的元素。 |
|---|---|
list | 形如 [1, 2, 3] 的列表字面量。 |
示例
- 删除第一个匹配项
delete_first(x, [x, y, x, z])返回 [y, x, z]。
从列表中移除指定元素的第一次出现。
delete_first(item, list)remove_first(item, list)item | 要移除一次的元素。 |
|---|---|
list | 形如 [1, 2, 3] 的列表字面量。 |
delete_first(x, [x, y, x, z])返回 [y, x, z]。