Commit 81f5f5f9 by BellCodeEditor

save project

parent dc6be297
Showing with 6 additions and 2 deletions
with open(r'C:\Users\Administrator\Desktop\test.txt','a',encoding='utf-8') as filel:
new_date=""
with open(r'C:\Users\Administrator\Desktop\test.txt','r',encoding='utf-8') as filel:
for data in filel:
if '小强:10' in data:
print('数据文件中')
data = data.replace("小强:10","小明12")
new_date+=data
print(new_date)
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