Mathematica 9 is now available
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / Element Extraction  /
Last

  • Last[ expr ] gives the last element in expr.
  • Last[ expr ] is equivalent to expr [[-1]].
  • See the Mathematica book: Section 1.8.4.
  • See also: Part, First, Take.

    Further Examples

    This returns the last element from the list.

    In[1]:=

    Out[1]=



    Any questions about topics on this page? Click here to get an individual response.Buy NowMore Information
    THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
    SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.