From 7443754ac7f61bd132d8113fe11f95e5b963d3a9 Mon Sep 17 00:00:00 2001 From: frxz751113 <156018267+frxz751113@users.noreply.github.com> Date: Fri, 16 Aug 2024 09:28:50 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E5=9C=A8=E7=BA=BFV4=E6=BA=90=E4=BC=98?= =?UTF-8?q?=E9=80=89.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- py/在线V4源优选.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/在线V4源优选.py b/py/在线V4源优选.py index 9f5f85b..15cce3d 100644 --- a/py/在线V4源优选.py +++ b/py/在线V4源优选.py @@ -43,13 +43,13 @@ for line in lines: # 如果没有"$",则直接添加到列表,确保以换行符结束 processed_lines.append(line.rstrip() + '\n') # 将处理后的内容写入新文件 -with codecs.open('源3.txt', 'w', 'utf-8') as file: +with codecs.open('源.txt', 'w', 'utf-8') as file: file.writelines(processed_lines) ################################################################################################### ################################################################################################### # 使用with语句打开输入文件进行读取 -with open("源3.txt", 'r', encoding='utf-8') as file: +with open("源.txt", 'r', encoding='utf-8') as file: lines = file.readlines() # 使用列表推导式过滤行 filtered_lines = [