Answers for "loop index in jinja"

0

jinja loop index

>>> from jinja2 import Template

>>> s = "{% for element in elements %}{{loop.index}} {% endfor %}"
>>> Template(s).render(elements=["a", "b", "c", "d"])
1 2 3 4
Posted by: Guest on March-15-2021

Code answers related to "Assembly"

Browse Popular Code Answers by Language