From 95b5553afc9ac959f8fbed17730bde84e79eaa5b Mon Sep 17 00:00:00 2001 From: BellCodeEditor <bellcode_dev@bell.ai> Date: Mon, 21 Aug 2023 15:19:57 +0800 Subject: [PATCH] save project --- diy.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/diy.py b/diy.py index 8f5a961..e5343cf 100644 --- a/diy.py +++ b/diy.py @@ -1,5 +1,8 @@ a=open(r"C:\Users\123\Desktop\bbbbb.text","r",encoding="utf-8")# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本' for i in a: if "李文:9本" in i: - print("在文件中") + print("李文:9本") + d+=i a.close() +with open(r"C:\Users\123\Desktop\bbbbb.text","r",encoding="utf-8") as a: + -- libgit2 0.25.0