This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

Drop

Drop
gives list with its first n elements dropped.
Drop
gives list with its last n elements dropped.
Drop
gives list with its n^(th) element dropped.
Drop
gives list with elements m through n dropped.
Drop
gives list with elements m through n in steps of s dropped.
Drop
gives a nested list in which elements specified by have been dropped at level i in list.
  • Drop uses the standard sequence specification:
Allall elements
Noneno elements
nelements 1 through n
-nlast n elements
{n}element n only
{m,n}elements m through n inclusive
{m,n,s}elements m through n in steps of s
  • Drop can be used on an object with any head, not necessarily List.
  • For a matrix, Drop effectively drops all elements except those in a submatrix of list.
Drop the first 2 elements from a list:
Drop the last 3 elements:
Drop elements 2 through 4:
Drop the first 2 elements from a list:
In[1]:=
Click for copyable input
Out[1]=
 
Drop the last 3 elements:
In[1]:=
Click for copyable input
Out[1]=
 
Drop elements 2 through 4:
In[1]:=
Click for copyable input
Out[1]=
Drop elements from the third to the third-to-last:
Drop every other element:
Drop the first row of a matrix:
Drop the first row, and the first two columns:
Drop none of the rows, but the first two columns:
Drop rows 2 through 4 and columns 3 through 5:
Drop every other row and every third column:
Drop works with any head, not just List:
Drop works with SparseArray objects:
Pick out a subimage:
Drop and Take are complementary:
Rest is a special case of Drop:
Most is a special case of Drop:
Drop always gives a list, even if only one element remains:
New in 1 | Last modified in 4