Commit fea58094 by BellCodeEditor

save project

parent 81233d4a
Showing with 7 additions and 2 deletions
with open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8')
\ No newline at end of file
with open(r'C:\Users\Administrator\Desktop\test.txt','w',encoding='utf-8') as file:
for date in file:
if'小强:10本'in date:
date=date.replace('小强:10本''小强:11本')
new_date+=date
print('数据在文件中')
\ 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