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

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

    Further Examples

    This takes the first three elements from the list.



    This takes the last two elements from the list.