Commit d48b0a32 by BellCodeEditor

auto save

parent 7e3a2ff3
Showing with 13 additions and 0 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
f=open(r"C:\Users\李栋\Desktop\此地无银三百两.txt","w",encoding="utf-8")
f.write("粑粑:10000元\n")
f.write("麻麻:1000元\n")
f.write("俞老师:0元\n")
f.close()
f=open(r"C:\Users\李栋\Desktop\此地无银三百两.txt","a",encoding="utf-8")
f.write("李昊冉:300两\n")
f.close()
with open(r"C:\Users\李栋\Desktop\此地无银三百两.txt","r",encoding="utf-8") as a:
print(a.read())
\ 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