make_list Filter

Data Structure

Documentation

Converts the value to a list of characters. Non-string values are first converted to strings.

Variables

company = 'Webucator'
number = 123456789

Template

{{ company|make_list }}<br>
{{ 123456789|make_list }}

Result

['W', 'e', 'b', 'u', 'c', 'a', 't', 'o', 'r']<br>
['1', '2', '3', '4', '5', '6', '7', '8', '9']

Commentary

We cannot think of a single practical use case for this. Can you?


Did we get something wrong? Is there a use case for the make_list filter that we should add? Please let us know.

Send Feedback

Official Documentation
This page last updated on Oct. 30, 2022, 1:21 p.m. EST