I would like to do something like:
variable p is from test.py which is a list [\'a\',\'b\',\'c\',\'d\']
{% for i in p %} {{variable++}} {{variable}} >
After 2.10, to solve the scope problem, you can do something like this:
{% set count = namespace(value=0) %} {% for i in p %} {{ count.value }} {% set count.value = count.value + 1 %} {% endfor %}