Commit 5d359ea4 by BellCodeEditor

auto save

parent b5b57f0f
Showing with 39 additions and 0 deletions
with open(r"C:\Users\XMBC\Desktop\test.txt",'w',encoding="utf_8") as file1:
file1.write("小明:20本\n")
file1.write("小红:20本\n")
file1.write("小强:20本\n")
file1.write("小李:20本\n")
with open(r"C:\Users\XMBC\Desktop\test.txt",'a',encoding="utf_8") as file1:
file1.write("小a:23本\n")
file1.write("小b:25本\n")
file1.write("小c:27本\n")
with open(r"C:\Users\XMBC\Desktop\test.txt",'r',encoding="utf_8") as file1:
print(file1.read())
\ No newline at end of file
小a
小b
小c
小d
小e
小f
小g
\ 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