Commit 27f70bb0 by BellCodeEditor

save project

parent ea366872
Showing with 6 additions and 2 deletions
...@@ -15,4 +15,8 @@ with open(r'C:\Users\用户\Desktop\book.txt','r',encoding='utf-8')as file1: ...@@ -15,4 +15,8 @@ with open(r'C:\Users\用户\Desktop\book.txt','r',encoding='utf-8')as file1:
i=i.replace('小兰:12本','小兰:14本') i=i.replace('小兰:12本','小兰:14本')
# print('小兰的数据在这个文件中') # print('小兰的数据在这个文件中')
new_i=i new_i=i
with open(r'C:\Users\用户\Desktop\book.txt','w',encoding='utf-8')as file1:
\ No newline at end of file file1.write(new_i)
with open(r'C:\Users\用户\Desktop\book.txt','r',encoding='utf-8')as file1:
a=file1.read()
print(a)
\ 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