Commit b67ad275 by BellCodeEditor

save project

parent b7da2500
Showing with 4 additions and 10 deletions
file2="" with open(r"C:\Users\qinlp\Desktop\sales_list.txt","r", encoding="utf-8") as file:
with open(r"C:\Users\qinlp\Documents\test\book.txt","r", encoding="utf-8") as file: file2=file.read()
for i in file: print(file2)
if "小兰:12本" in i: \ No newline at end of file
i=i.replace("小兰:12本","小兰:8848本")
print(i)
file2=file2+i
with open(r"C:\Users\qinlp\Documents\test\book.txt","w", encoding="utf-8") as file:
file.write(file2)
\ 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