Python dictionary in to html table

后端 未结 7 1288
刺人心
刺人心 2020-12-23 21:33

Is there any way to print the python dictionary in to a table in HTML. I have a python dictionary and am sending to HTML by using

return render_template(\'i         


        
7条回答
  •  Happy的楠姐
    2020-12-23 21:57

    For python3, no () after result.items

    
    {% for key, value in result.items %}
       
    {% endfor %}
    
    {{ key }} {{ value }}

提交回复
热议问题