How to return list of list on template flask
<p>How to output list[] of list on template of flask ?</p>

<p>I have table[] </p>

<pre><code>table = [[ str(i + 1)  if (i + 1) % 2 == 0 else i + 1,
                   href[i] if (i + 1) % 2 == 0 else href[i],
                   href2[i] if (i + 1) % 2 == 0 else href2[i]] for i in range(len(href))]

return render_template('index.html',table=table)
</code></pre>

<p>I want this like this</p>

<pre><code>&lt;table&gt;
&lt;tr&gt;
{% for table in table %}
&lt;th&gt;{{href[1]}} ,{{href2[1]}}&lt;/th&gt;
{% endfor %}
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>

<p>i want this output </p>

<pre><code>&lt;table&gt;
&lt;tr&gt;
&lt;th&gt;href[1] ,href2[1]&lt;/th&gt;
&lt;th&gt;href[2] ,href2[2]&lt;/th&gt;
&lt;th&gt;href[3] ,href2[3]&lt;/th&gt;
...
&lt;/tr&gt;
&lt;/table&gt;
</code></pre>