我有一行文字,像这样:
http://www.example.org/lexicon#13797906 http://www.monnetproject.eu/lemon#gloss an overwhelming number or amount; "a flood of requests"; "a torrent of abuse"
我想把它分成三个部分,但是只需要使用前两个空格作为它们应该分开的地方。以下是我期待的结果:
http://www.example.org/lexicon#13797906
http://www.monnetproject.eu/lemon#gloss
an overwhelming number or amount; "a flood of requests"; "a torrent of abuse"
我教过maxsplit可以工作,但我不知道如何在这种情况下使用它
str.split
方法采用可选计数:相关问题 更多 >
编程相关推荐