Commit 60b56b21 by BellCodeEditor

save project

parent 48dc3be0
Showing with 8 additions and 0 deletions
...@@ -9,3 +9,10 @@ with open(r"C:\Users\admin\Desktop\test.txt","a",encoding="utf-8")as file: ...@@ -9,3 +9,10 @@ with open(r"C:\Users\admin\Desktop\test.txt","a",encoding="utf-8")as file:
with open(r"C:\Users\admin\Desktop\test.txt","r",encoding="utf-8")as file: with open(r"C:\Users\admin\Desktop\test.txt","r",encoding="utf-8")as file:
a=file.read() a=file.read()
print(a) print(a)
with open(r"C:\Users\admin\Desktop\test.txt","r",encoding="utf-8")as file:
new_date=""
for date in file:
if "小丽:11本" in date:
date=date.replace("小丽:11本","小丽:12本")
new_date+=date
print(new_date)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment