Commit c664c7af by BellCodeEditor

save project

parent 758cced6
Showing with 8 additions and 4 deletions
with open(r"C:\Users\maku\Desktop\1234.txt","a",encoding="utf")as filel:
for i in filel:
if "小兰:12本" in i
print("小兰:12本")
\ No newline at end of file
i=i.replace("小兰12本","小兰20本")
new_i +=i
with open(r"C:\Users\maku\Desktop\1234.txt","a",encoding="utf")as filel:
filel.write(new_i)
with open(r"C:\Users\maku\Desktop\1234.txt","a",encoding="utf")as filel:
a=filel.read()
print(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