Commit 76a56210 by BellCodeEditor

save project

parent 8679043c
Showing with 6 additions and 0 deletions
...@@ -8,6 +8,11 @@ f.write('何睿轩:15本\n') ...@@ -8,6 +8,11 @@ f.write('何睿轩:15本\n')
f.close() f.close()
# with open(r"C:\Users\61073\Desktop\text.txt","a",encoding="utf-8") as f: # with open(r"C:\Users\61073\Desktop\text.txt","a",encoding="utf-8") as f:
# f.write('何睿轩:15本\n') # f.write('何睿轩:15本\n')
new_date=""
with open(r"C:\Users\61073\Desktop\text.txt","r",encoding="utf-8") as f: with open(r"C:\Users\61073\Desktop\text.txt","r",encoding="utf-8") as f:
a=f.read() a=f.read()
print(a) print(a)
for date in a:
if "小兰:12本"in date:
date=date.replace("小兰:12本","小兰:120本")
new_date+=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