Commit 5e567ea7 by BellCodeEditor

save project

parent a8d02629
Showing with 12 additions and 0 deletions
ndd=''
with open(r"C:\Users\maku\Desktop\book.txt",'r',encoding="utf-8")as fee:
for i in fee:
if '小兰:12本'in i:
i=i.replace('小兰:12本','小兰:20本')
ndd+=i
with open(r"C:\Users\maku\Desktop\book.txt",'w',encoding="utf-8")as fee:
fee.write(ndd)
with open(r"C:\Users\maku\Desktop\book.txt",'r',encoding="utf-8")as fee:
j=fee.read()
print(j)
\ 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