我有一个python字典,它存储HTML标题和用户的注释。我想在新行中显示每个注释。我在想,有没有一种方法可以通过某种循环来实现这个目的,比如说暂时还是暂时?我现在手动显示。如果有用的话,我用烧瓶。这是我的代码:
Python:
with open ("comments.txt", "r") as myfile:
data=myfile.read()
display_information = {
'title':'My title'
'messages':data.split('*')
}
return render_template('test.html', pageinfo=display_information)
HTML格式:
^{pr2}$有没有一种在新行上显示信息的快速方法?在
迭代
pageinfo.messages
:相关问题 更多 >
编程相关推荐