DOCUMENTATION CENTER SEARCH
Mathematica
>
Parts of Expressions
>
Built-in
Mathematica
Symbol
Getting Pieces of Lists
Tutorials »
|
Part
First
Take
Most
See Also »
|
Elements of Lists
List Manipulation
Parts of Expressions
More About »
Last
Last
[
expr
]
gives the last element in
expr
.
MORE INFORMATION
Last
[
expr
]
is equivalent to
expr
[[-1]]
.
EXAMPLES
CLOSE ALL
Basic Examples
(3)
Extract the last element of a list:
In[1]:=
Out[1]=
Extract the last row of a matrix:
In[1]:=
Out[1]=
The head need not be
List
:
In[1]:=
Out[1]=
Generalizations & Extensions
(1)
Properties & Relations
(1)
Possible Issues
(2)
SEE ALSO
Part
First
Take
Most
TUTORIALS
Getting Pieces of Lists
MORE ABOUT
Elements of Lists
List Manipulation
Parts of Expressions
New in 1
© 2008 Wolfram Research, Inc.