我编写了一个小脚本,在达到某个字符限制后创建一个新的行中断。现在的问题是,脚本从文本末尾开始输出文本。我似乎想不出如何在不使脚本变得更复杂的情况下使文本按正确的顺序打印出来。e desired line ord that reache e character '\
Insert a newlinInsert a newline character '\\n' after each word that reache
People Tom Carol
基本上是标题(人物),一些固定的选项卡,然后在新的一行中列出姓名(它看起来有点像一个表)。我想在Python中使用textwrap来实现这一点,但如果有任何其他的可能性,我也持开放态度。dedented_text = textwrap.dedent(' This is a test sentecne to see how well the textwrap works and henc
我在数据库里没有看到这个问题--如果是重复的,请告诉我!str = "This is a string with length of some arbitrary number greater than 20"tmp="" tmp += word + " "
count += len(word + "
我试图将长字符串发送到raspberry pi上的20x4液晶显示器,这意味着4行20个字符。
特殊人物,如“,”,“.”,“!”,“?”= "This is a very long string with many many many many and many more sentences and there is not one character