Commit 58cab12d by BellCodeEditor

save project

parent 6035d852
Showing with 10 additions and 4 deletions
......@@ -7,6 +7,12 @@
# file.close()
with open(r'C:\Users\EDZ\Desktop\test.txt','w',encoding='utf-8') as file:
file.write('小强:12本\n')
file.write('李明:15本\n')
\ No newline at end of file
# with open(r'C:\Users\EDZ\Desktop\test.txt','a',encoding='utf-8') as file:
# file.write('小强:12本\n')
# file.write('李明:15本\n')
file=open(r'C:\Users\EDZ\Desktop\test.txt','r',encoding='utf-8')
a=file.read()
print(a)
file.close()
\ 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