📅  最后修改于: 2022-03-11 14:45:07.715000             🧑  作者: Mango
>>> from jinja2 import Template
>>> t1 = """
... {% for val in ['a', 'b', 'c'] %}
...
... {{ loop.index0 }} {{ val }}
...
... {% endfor %}
... """
>>> Template(t1).render()