Commit 09096c6c by BellCodeEditor

save project

parent 825f166f
Showing with 8 additions and 4 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
fill=open('C:\\Users\\yu\\Desktop\\编程\\tt.txt','w',encoding='gb2312')
fill.write("小兰:12本")
fill.write("小丽:11本")
fill.write("李文:9本")
fill.write("张伟:16本")
fill.write("小兰:12本\n")
fill.write("小丽:11本\n")
fill.write("李文:9本\n")
fill.write("张伟:16本\n")
fill.close()
with open('C:\\Users\\yu\\Desktop\\编程\\tt.txt','a',encoding='gb2312') as fill:
fill.write("小红:999999本\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