Commit b5be5c0e by BellCodeEditor

save project

parent 3945032a
Showing with 12 additions and 3 deletions
...@@ -5,9 +5,18 @@ ...@@ -5,9 +5,18 @@
#file1.write('小b:16本\n') #file1.write('小b:16本\n')
#file1.close() #file1.close()
file1= open('c:\\Usars\\CM\\Desktop\\test.txt','a',encoding='utf-8') with open('c:\\Usars\\CM\\Desktop\\test.txt','r',encoding='utf-8') as
file1.write('小v:16本\n') # a=file1.read()
file1.close() # print(a)
for data in file1:
if '小强:10本' in data:
data=data.replace('小逼:10本''小逼:11本')
print(data)
......
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