Commit d1cbf2d0 by BellCodeEditor

save project

parent 72d16a29
Showing with 1 additions and 2 deletions
...@@ -9,9 +9,8 @@ new_data='' ...@@ -9,9 +9,8 @@ new_data=''
with open(r'C:\Users\BBTC\Desktop\test.txt','r',encoding='utf-8') as file1: with open(r'C:\Users\BBTC\Desktop\test.txt','r',encoding='utf-8') as file1:
for data in file1: for data in file1:
if 'D:10' in data: if 'D:10' in data:
print('在')
data=data.replace('D:10','D:11') data=data.replace('D:10','D:11')
new_data +data new_data +=data
with open(r'C:\Users\BBTC\Desktop\test.txt','w',encoding='utf-8') as file1: with open(r'C:\Users\BBTC\Desktop\test.txt','w',encoding='utf-8') as file1:
file1.write(new_data) file1.write(new_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