Commit 88612a4d by BellCodeEditor

save project

parent dc22b1a3
Showing with 12 additions and 0 deletions
# 写入同学们的捐赠明细:'小兰:12本'
lihip=open(r"C:\Users\Administrator\Desktop\text.txt","a",encoding="utf-8")
lihip.write("小兰:12\n小丽:11\n李文:9\n张伟:16")
lihip.close()
lihip=open(r"C:\Users\Administrator\Desktop\text.txt","a",encoding="utf-8")
lihip.write("小强:12\n李明:15")
lihip.close()
lihip=open(r"C:\Users\Administrator\Desktop\text.txt","r",encoding="utf-8")
a=lihip.read()
print(a)
lihip.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