Skip to content

Esta página también está en español.

Léela en español

このページは日本語でも読めます。

日本語で読む

本页也有简体中文版本。

阅读简体中文版本

drop function

A list without its first elements.

How to write it

drop(list, n)

list
The list. Takes a list.
n
How many elements to leave out. Takes a whole number.

Examples

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

    In the solver, drop([1, 2, 3, 4], 2) gives [3, 4].

    Open in the solver
  • first

    The first element of a list.

  • dimensions

    The size of a list or a matrix, level by level.

  • flatten

    Nested lists flattened into one list.

  • count

    How many elements of a list equal a value.

  • fold

    Combine the elements of a list from the left with a function, starting from a value.

  • constant_array

    A list of copies of a value.