0
我需要textwrap每行超過80個字符,並將長段落分成80個字符塊。每行和每段末尾都有一個\ n。Python textwarp每一行和段落
This is the first line of text with more than eighty characters in this sentence.**\n**
**\n**
This line of text is less than eighty characters.**\n**
**\n**
This is the first sentence of the first paragraph. This is the second sentence of the first paragraph. This is the third sentence of the first paragraph. This is the fourth sentence of the first paragraph. This is the fifth sentence of the first paragraph.**\n**
**\n**
This is the first sentence of the second paragraph. This is the second sentence of the second paragraph. This is the third sentence of the second paragraph. This is the fourth sentence of the second paragraph.**\n**
我需要的輸出看起來像這樣:
This is the very first line of text with more than eighty characters in this **\n**
sentence.**\n**
**\n**
This line of text is less than eighty characters.**\n**
**\n**
This is the first sentence of the first paragraph. This is the second sentence **\n**
of the first paragraph. This is the third sentence of the first paragraph. This **\n**
is the fourth sentence of the first paragraph. This is the fifth sentence of the **\n**
first paragraph.**\n**
**\n**
This is the first sentence of the second paragraph. This is the second sentence **\n**
of the second paragraph. This is the third sentence of the second paragraph. This **\n**
is the fourth sentence of the second paragraph.**\n**
只使用一個HTML的特殊格式 – 2012-08-02 06:19:39
爲什麼不能指望每行的字符數,如果大於80格式化相應地 – 2012-08-02 06:28:42