flask enumerate index

56

flask enumerate index -

>>> from jinja2 import Template

>>> t1 = """
... {% for val in ['a', 'b', 'c'] %}
...     <td>
...         {{ loop.index0 }} {{ val }}
...     </td>
... {% endfor %}
... """
>>> Template(t1).render()

Comments

Submit
0 Comments