Commit acab1206 by BellCodeEditor

save project

parent b7c5be9c
Showing with 7 additions and 5 deletions
......@@ -2,11 +2,13 @@
# bai=open(r"C:\Users\Administrator\Desktop\王白\wang.txt","w",encoding="utf-8")
# bai.write("小兰:12本\n小丽:11本")
# bai.close()
bai2 = ""
with open(r"C:\Users\Administrator\Desktop\王白\wang.txt","r",encoding="utf-8") as bai:
a=bai.read()
for i in a:
if "bai:10" in i:
print("found")
if "小兰:12本" in i:
i.replace("小兰:12本","小兰:14本")
bai2+=i
else:
print("Lost")
break
\ No newline at end of file
bai2+=i
print(bai2)
\ 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