Commit 48e10494 by BellCodeEditor

save project

parent 1c99ea7d
Showing with 5 additions and 3 deletions
......@@ -6,7 +6,8 @@ new_data=''
with open(r'C:\Users\XMBC\Desktop\text.txt','r',encoding='utf-8')as text:
for data in text:
if '小兰:12本' in data:
data.replace('小兰:12本','小兰:13本')
data=data.replace('小兰:12本','小兰:13本')
new_data+=data
print(new_data)
print(new_data)
with open(r'C:\Users\XMBC\Desktop\text.txt','w',encoding='utf-8')as text1:
text1.write(new_data)
\ 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