Commit ef5a5332 by BellCodeEditor

save project

parent f9eac95e
Showing with 0 additions and 2 deletions
...@@ -8,6 +8,5 @@ with open(r"C:\Users\admin\Desktop\book.txt",'r',encoding="utf-8") as a: ...@@ -8,6 +8,5 @@ with open(r"C:\Users\admin\Desktop\book.txt",'r',encoding="utf-8") as a:
if "小强:10本" in i: if "小强:10本" in i:
i=i.replace("小强:10本","小强:11本") i=i.replace("小强:10本","小强:11本")
s=s+i s=s+i
print(s)
with open(r"C:\Users\admin\Desktop\book.txt",'w',encoding="utf-8") as x: with open(r"C:\Users\admin\Desktop\book.txt",'w',encoding="utf-8") as x:
x.write(s) x.write(s)
\ 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