# (last list)
[GstarCAD 2011](../../../Index.md) → [Developer Reference](../../%28Developer%20Reference%29.md) → [AutoLISP Reference](../%28AutoLISP%20Reference%29.md) → [LISP Functions](%28LISP%20Functions%29.md)
<a id="209"></a>
## (last list)
---
Determine the last item in that list.
---
This function returns the last element in a *list*. The element is not returned in a list, unless the last element is a list, as shown by the examples below.
### Examples
| Code | Returns |
| --- | --- |
| (setq b ' ( 1 2 3 4)) | (1 2 3 4\) |
| (**last** b) | 4 |
| (**last** '("first" "second" ("third" "fourth"))) | ("third" "fourth") |
**NOTE** This function should be used with caution. For example, you may want a function to retrieve the z-coordinate of a point. However, there are some cases in which the point contains only the x- and y-coordinates. Your function would accidentally get the y-coordinate. For this reason, it is sometimes a better idea to use a mixture of the [car](%28car%20list%29.md) and [cdr](%28cdr%20list%29.md) functions.
**Tell me about...**
[(length list)](%28length%20list%29.md)
[(nth integer list)](IDR_LISP_B234.md)
[(reverse list)](%28reverse%20list%29.md)
[(setq symbol1 statement1 \[symbol2 statement2\] ...)](%28setq%20symbol1%20statement1%20-symbol2%20statement2-%20...%29.md)
[LISP Compatibility](../LISP%20Compatibility.md)
[Programming Overview of LISP (LISt Processing) Language](../Programming%20Overview%20of%20LISP%20%28LISt%20Processing%29%20Language.md)
<a id="holding"></a>
## Other versions with matching text
[GstarCAD 2012](../../../../2012/Developer%20Reference/AutoLISP%20Reference/LISP%20Functions/%28last%20list%29.md)