Commit 60430fc7 by BellCodeEditor

save project

parent e84238ed
Showing with 10 additions and 10 deletions
file1=open(r"C:\Users\噜噜\Desktop\txt.txt",'w',encoding='utf-8') st=' '
file1.write('小兰:12本') with open(r"C:\Users\噜噜\Desktop\txt.txt",'r',encoding='utf-8')as file1:
file1.close() for i in file1:
file1=open(r"C:\Users\噜噜\Desktop\txt.txt",'a',encoding='utf-8') if '小兰:12本' in i:
file1.write('小:12本') i=i.replace('小兰:12本','小兰:11本')
file1.close() st+=i
file1=open(r"C:\Users\噜噜\Desktop\txt.txt",'r',encoding='utf-8') with open(r"C:\Users\噜噜\Desktop\txt.txt",'w',encoding='utf-8')as file1:
for i in file1: file1.write(st)
if '小兰:12本' in i:
print('ok')
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