在python中使用空格将行拆分为三部分

2024-10-02 10:20:15 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一行文字,像这样:

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可以工作,但我不知道如何在这种情况下使用它


Tags: oroforganhttpnumberexamplewww

热门问题