摘要内容
文字阐述内容
文字阐述内容
文字阐述内容
文字阐述内容
文字阐述内容
文字阐述内容
文字 阐 述 内 容 p >
< p > 文 字 阐 述 内 容 p >
< h 三 > 四 个 小 标 题 使用 < h 的 方 式 进 行 包 裹 , 并 控 制 在 汉 字 左 右 。< / h >
< 做详细样式要求,这里只是简单演示
def wrap_h ( title ) :
return "def wrap_p(content):
return "{}
".format(content)def generate_article(title, content):
article = ""
article += wrap_h(title)
for paragraph in content:
article += wrap_p(paragraph)
return article
title1 = "一.小标题1"
content1 = ["第一个自然段", "第二个自然段"]
title2 = "二.小标题2"
content2 = ["第一个自然段", "第二个自然段"]
title3 = "三.小标题3"
content3 = ["第一个自然段", "第二个自然段"]
title4 = "四.小标题4"
content4 = ["第一个自然段", "第二个自然段"]
article_content = [generate_article(title1, content1), generate_article(title2, content2),
generate_article(title3, content3), generate_article(title4, content4)]
summary ="摘要内容"
def wrap_summary(summary):
return "{}
".format(summary)def wrap_title():
title_wrap="return title_wrap
summary_html=wrap_summary(summary)
article_html="".join(article_content)
title_html=wrap_title()
result=summary_html+article_html+title_html
print(result)
上一篇:剑灵私服里的装备怎么获取?