Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

flask enumerate index

>>> from jinja2 import Template

>>> t1 = """
... {% for val in ['a', 'b', 'c'] %}
...     <td>
...         {{ loop.index0 }} {{ val }}
...     </td>
... {% endfor %}
... """
>>> Template(t1).render()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flask #enumerate #index
ADD COMMENT
Topic
Name
7+9 =