# Last list element

Canonical: https://www.wiki.jodisand.me/snippets/python/last/


Returns the last element in a list.

- Use `lst[-1]` to return the last element of the passed list.

```py
def last(lst):
  return lst[-1]
```

```py
last([1, 2, 3]) # 3
```


