Commit 50f91f77 by BellCodeEditor

save project

parent 2e5f739f
Showing with 4 additions and 5 deletions
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
with open(r"C:\Users\Administrator\Desktop\test.txt",'r',encoding='utf-8')as file: with open(r"C:\Users\Administrator\Desktop\test.txt",'r',encoding='utf-8')as file:
for data in file: for data in file:
if'小强:语文12本'in data: if'小强:语文12本'in data:
print('在') data=data.replace("小强:语文12本","小强:语文13本")
file=file.replace("小兰:数学12本","小兰:数学13本") new_data+=data
new_file+=file print(new_data)
print(new_file) \ No newline at end of file
\ 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