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}} >
if anyone want to add a value inside loop then you can use this its working 100%
{% set ftotal= {'total': 0} %} {%- for pe in payment_entry -%} {% if ftotal.update({'total': ftotal.total + 5}) %}{% endif %} {%- endfor -%} {{ftotal.total}}
output = 5