Commit 8f41e88a by BellCodeEditor

save project

parent 9b7429a0
Showing with 2 additions and 1 deletions
......@@ -11,6 +11,6 @@ with open("C:\\Users\\Administrator\\Desktop\\test.txt",'a',encoding='utf-8') as
with open("C:\\Users\\Administrator\\Desktop\\test.txt",'r',encoding='utf-8') as file:
for data in file1:
if '小强:12本 ' in data:
data=data.replace('小强:12本','小强:1本')
data=data.replace('小强:12本','小强:13本')
new_data +=data
print(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