Commit 3dda7ed2 by BellCodeEditor

save project

parent 05b3e29b
Showing with 5 additions and 3 deletions
hh =''
with open(r'C:\Users\86139\Desktop\hh.txt','r',encoding='utf-8') as file1:
for i in file1:
if'小明:10本'in i:
print('数据在文件')
\ No newline at end of file
hh=i.replace('小明:13本')
with open(r'C:\Users\86139\Desktop\hh.txt','r',encoding='utf-8') as file1:
file1.write(hh)
\ 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