Commit 4d7d6801 by BellCodeEditor

auto save

parent 1e0296dd
Showing with 11 additions and 0 deletions
......@@ -3,4 +3,15 @@ with open(r'C:\Users\CM\Desktop\test.txt','w',encoding='utf-8') as filel:
for data in filel:
if '小强:10' in data:
data=data.replace('小强:10' '小强:11')
if '小兰:12本' in data:
data=data.replace('小兰:12本','小兰:14本')
new_date +=data
with open(r'C:\Users\CM\Desktop\test.txt','w',encoding='utf-8') as filel:
filel.write(new_date)
with open(r'C:\Users\CM\Desktop\test.txt','w',encoding='utf-8') as filel:
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