Commit e8871009 by BellCodeEditor

auto save

parent 75a3c66b
Showing with 3 additions and 2 deletions
...@@ -14,7 +14,7 @@ with open(r"C:\Users\Administrator\Desktop\test.txt",'r',encoding='utf-8') as le ...@@ -14,7 +14,7 @@ with open(r"C:\Users\Administrator\Desktop\test.txt",'r',encoding='utf-8') as le
if "小强:10本" in data: if "小强:10本" in data:
data=data.replace("小强:10本","小强:11本") data=data.replace("小强:10本","小强:11本")
if "小兰:12本" in data: if "小兰:12本" in data:
data=data.replace("小兰:12本","小:14本") data=data.replace("小兰:12本","小:14本")
new_data += data new_data += data
with open(r"C:\Users\Administrator\Desktop\test.txt",'r',encoding='utf-8') as lest: with open(r"C:\Users\Administrator\Desktop\test.txt",'w',encoding='utf-8') as lest:
lest.write(new_data) lest.write(new_data)
\ 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