I have a dictionary of list. eg :
result = {
'a': ['x', 'y', 'z'],
'b': ['p', 'q', 'r'],
'c': ['m', 'n', 'o']
}
I want a, b and c to be the headings of my table and corresponding lists under that particular column.
I have passed the dictionary to html from cherrypy like this return tmpl.render(result = result)
Addition: This is the html code written
<table id="myTable"> {% for k,v in result.items() %}
<th> {{ k }}</th>
{% for val in v %}
<tr>
<td> {{ val }}</td>
</tr>
{% endfor %} {% endfor %}
</table>