Commit 733ad315 by BellCodeEditor

save project

parent 367c35fd
Showing with 5 additions and 7 deletions
word = open(r"C:\Users\xuank\Desktop\diy.txt",'w',encoding='utf-8')
word.write("小兰:12本")
word.write("李文:19本")
word.write("张伟:10本")
word.write("小丽:39本")
word.close()
\ No newline at end of file
with open(r"C:\Users\xuank\Desktop\diy.txt",'a',encoding='utf-8') as word:
word.write("小兰:20本\n")
word.write("小强:19本\n")
word.write("李明:10本\n")
word.write("小丽:39本\n")
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