Commit aaa33e81 by BellCodeEditor

save project

parent 76d0a6b6
Showing with 3 additions and 0 deletions
...@@ -10,3 +10,6 @@ file.close() ...@@ -10,3 +10,6 @@ file.close()
with open(r"C:\Users\小梦\Desktop\test.txt",'a',encoding='utf-8') as file: with open(r"C:\Users\小梦\Desktop\test.txt",'a',encoding='utf-8') as file:
file.write('小强:10本\n') file.write('小强:10本\n')
file.write('小明:15本\n') file.write('小明:15本\n')
with open(r"C:\Users\小梦\Desktop\test.txt",'r',encoding='utf-8') as file:
a = file.read()
print(a)
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