# split\_in

Source: https://zotonic.com/docs/1946/split_in

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

Language: en



This filter split a list in shorter lists. It splits an array in N sub-arrays of more or less equal length. This is useful when displaying a list of items in columns.

For example:

```django
{% with [1,2,3,4,5,6]|split_in:3 as a,b,c %}
    {% for n in a %}{{ n|format_number }} {% endfor %}
{% endwith %}
```

This displays `1 4`. The variable b will be `[2,5]` and the variable c will be `[3,6]`.

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1946?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/1946?language=en>)
