Commit d33d89ef by BellCodeEditor

auto save

parent e807903b
Showing with 11 additions and 6 deletions
......@@ -11,12 +11,17 @@ with open(r"C:\Users\Administrator\Desktop\diy1.txt",'r',encoding='utf-8') as fi
if '小强' in i:
print('在文件中')
i=i.replace('小强:12本','小强:11')
iii=i
for w in a:
if '小丽' in i:
if '小丽' in a:
print('在文件中')
w=w.replace('小丽:12本','小丽:14本')
www=w
i=i.replace('小丽:12本','小丽:11')
iii=i
# for w in a:
# if '小丽' in i:
# print('在文件中')
# w=w.replace('小丽:12本','小丽:14本')
# www=w
# iiiwww=iii+www
with open(r"C:\Users\Administrator\Desktop\diy1.txt",'w',encoding='utf-8') as file1:
file1.write(iii)
file1.write(www)
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