Commit 40f6aa3d by BellCodeEditor

auto save

parent 7626d4ae
Showing with 5 additions and 1 deletions
......@@ -10,6 +10,10 @@ with open(r"C:\Users\admin\Desktop\book.txt",'r',encoding='utf-8') as file1:
if "小兰:12本" in data:
data=data.replace("小兰:12本","小兰:13本")
new_data+=data
print(new_data)
with open(r"C:\Users\admin\Desktop\book.txt",'w',encoding='utf-8') as file2:
file2.write(new_data)
with open(r"C:\Users\admin\Desktop\book.txt",'r',encoding='utf-8') as file3:
a=file3.read()
print(a)
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