# last

Source: https://zotonic.com/docs/1766/last

URI: https://zotonic.com/id/1766

Language: en



Returns the last character or element.

Returns the last element of the value. When the value is a list then the last element of the list is returned, when the value is a binary then the last byte of the binary is returned.

For example:

```django
{{ value|last }}
```

When value is the list `hello` then the output will be `o`.

::: {.note title="Note"}
This function is not safe to use with multibyte character values, use with care.
:::

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1766?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1766?language=en>)
