我有一段文字是这样写的:
text = "All human beings are born free and equal in dignity and rights. They are endowed with reason and conscience and should act towards one another in a spirit of brotherhood."
如何编写一个函数对冲(text)来处理我的文本并生成一个新版本,在文本的每三个单词中插入单词“like”?在
结果应该是这样的:
^{pr2}$谢谢你!在
你可以这样做:
而不是给你
我在贴一个关于如何解决这个问题的一般建议。“算法”并不是特别的“Python”,但希望很容易理解:
^{pr2}$如果您有任何问题,请告诉我们。在
相关问题 更多 >
编程相关推荐