Commit 4f6059e8 by BellCodeEditor

save project

parent 46cfab56
Showing with 7 additions and 2 deletions
...@@ -9,4 +9,9 @@ with open(r"C:\Users\admin\Desktop\SB.txt","a",encoding="utf-8") as sb2: ...@@ -9,4 +9,9 @@ with open(r"C:\Users\admin\Desktop\SB.txt","a",encoding="utf-8") as sb2:
with open(r"C:\Users\admin\Desktop\SB.txt","r",encoding="utf-8") as sb3: with open(r"C:\Users\admin\Desktop\SB.txt","r",encoding="utf-8") as sb3:
a=sb3.read() a=sb3.read()
if "小兰:12本" in a: if "小兰:12本" in a:
print("ok") print("ok")
\ No newline at end of file a=a.replace("小兰:12本","小兰:200本")
with open(r"C:\Users\admin\Desktop\SB.txt","w",encoding="utf-8") as sb4:
print(a)
sb4.write(a)
\ 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