I have a nested list. I need to iterate through a list and keep it in for loop as shown below.
{% for alpha in list %}
<div id="{{ loop.index }}">
<div class='sidebar-one'>
{% for beta in list[0][2:] %} #I want to iterate through list[0][2:] till list[n][2:]
<p> {{ beta[0][0] }} </p>
{% endfor %}
</div>
</div>
{% endfor %}
I tried range but no luck.
{% for n in range(1,n) %}
{% for line in check[{{n}}][2:] %}
{% endfor %}
it threw error:
TemplateSyntaxError: expected token ':', got '}'
It's just like Python:
{% for n in range(n) %}
{% for line in check[n][2:] %}
<p> {{ beta[0][0] }} </p>
{% endfor %}
{% endfor %}