Commit 48dc3be0 by BellCodeEditor

auto save

parent 14999a32
Showing with 5 additions and 2 deletions
...@@ -5,4 +5,7 @@ file.close() ...@@ -5,4 +5,7 @@ file.close()
file=open(r"C:\Users\admin\Desktop\test.txt","a",encoding="utf-8") file=open(r"C:\Users\admin\Desktop\test.txt","a",encoding="utf-8")
file.write("小丽:11本\n") file.write("小丽:11本\n")
with open(r"C:\Users\admin\Desktop\test.txt","a",encoding="utf-8")as file: with open(r"C:\Users\admin\Desktop\test.txt","a",encoding="utf-8")as file:
file.write("李宁:12本\n") file.write("李宁:12本\n")
\ No newline at end of file with open(r"C:\Users\admin\Desktop\test.txt","r",encoding="utf-8")as file:
a=file.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