use of enumerate() in Jinja templates

Hi,
is there a pattern for implementing loop similar to python:

`
for (i,name) in enumerate(list_of_items):
print i, name

`

when I try to implement it in Jinja I get error (no enumerate is not available):

`
{% for (i,name) in enumerate(list_of_items) %}
item{{ i }} = {{ name }}
{%endfor %}

`

what would be the best way of achieving similar result without implementing my own filter?

discovered https://groups.google.com/forum/embed/#!topic/pocoo-libs/gDPqQiRBhdg which mentiones loop.index variable. That’ll do for me.