如何删除特定单词前的所有文本?

2024-06-16 18:51:29 发布

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

txt1_response = requests.get("http://www.gutenberg.org/cache/epub/11313/pg11313.txt")
txt1 = txt1_response.text

我已经阅读了这个网址上的所有文字。我想删除“关于动物”之前的所有文本内容

最好的方法是什么?你知道吗


Tags: textorgtxthttpcachegetresponsewww