Commit 4b8d4f9a by BellCodeEditor

save project

parent 3e9d221b
Showing with 5 additions and 7 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
t1=open(r'C:\Users\win 10\Desktop\新建文本文档.txt','w',encoding="utf-8")
t1.write('小兰12本\n')
t1.write('小丽11本\n')
t1.write('李文9本\n')
t1.write('张伟16本\n')
t1.close()
\ No newline at end of file
with open(r'C:\Users\win 10\Desktop\新建文本文档.txt','w',encoding='utf-8') as t1:
t1.write('小兰12本\n')
t1.write('小丽11本\n')
t1.write('李文9本\n')
t1.write('张伟16本\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