Commit 3381128e by BellCodeEditor

save project

parent a8d02629
Showing with 13 additions and 0 deletions
n_d=''
with open(r'C:\Users\Administrator\Desktop\ll.txt','a',encoding='utf-8') as l:
l.write('小兰:10本\n')
l.write('小强:13本\n')
l.write('李明:15本\n')
with open(r'C:\Users\Administrator\Desktop\ll.txt','r',encoding='utf-8') as l:
for d in l:
if '小强:13本' in d:
d=d.replace('3','1')
n_d+=d
with open(r'C:\Users\Administrator\Desktop\ll.txt','w',encoding='utf-8') as l:
l.write(n_d)
\ 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