How do I get the number of elements in a list in jinja2 template?

For example, in Python:

print(template.render(products=[???]))

and in jinja2

<span>You have {{what goes here?}} products</span>

4 Answers
4

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *