Reputation: 4177
Suppose i have this
mylst = [(a, b, c), (x, y, z), (l, m, n)]
now instead of having this
{\% for item in mylst \%}
{{ item.0 }} {{ item.1}} {{ item.2 }}
{\% endfor \%}
can i have another loop like
{\% for item in mylst \%}
{\% for a in item.length \%}
{{item.index }}
{\% endfor \%}
{\% endfor \%}
Upvotes: 2
Views: 2389
Reputation: 599610
No, and you don't want to. Iterate through the inner list in exactly the same way as the outer one.
{% for item in mylst %}
{% for a in item %}
{{ a }}
{% endfor %}
{% endfor %}
Upvotes: 3