This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / Element Extraction  /
Drop

  • Drop[ list , n ] gives list with its first n elements dropped.
  • Drop[ list , - n ] gives list with its last n elements dropped.
  • Drop[ list , n ] gives list with its n element dropped.
  • Drop[ list , m , n ] gives list with elements m through n dropped.
  • Drop uses the standard sequence specification (see Section A.3.5).
  • Example: Drop[ a,b,c,d,e , 2].
  • Drop[ a,b,c,d,e , -3].
  • Drop can be used on an object with any head, not necessarily List.
  • See the Mathematica book: Section 1.8.4.
  • See also: Rest, StringDrop, Take, Cases.
  • Related package: LinearAlgebra`MatrixManipulation`.

    Further Examples

    This gives the list with the first element dropped

    In[1]:=

    Out[1]=

    This drops the last element.

    In[2]:=

    Out[2]=

    This drops the third through fifth elements from the list.

    In[3]:=

    Out[3]=