Commit 52675025 by BellCodeEditor

save project

parent d5264a07
Showing with 9 additions and 6 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'''、'张伟:16本' # 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'''、'张伟:16本'
b=open(r'C:\Users\Windows 7\Desktop\12.txt','w',encoding='utf-8') #b=open(r'C:\Users\Windows 7\Desktop\12.txt','a',encoding='utf-8')
#b.write('小兰,12本') #b.write('小兰:12本\n')
b.write('小强:10本\n') #b.write('小强:10本\n')
b.write('李强:15本\n') #b.write('李强:15本\n')
b.close() #b.close()
\ No newline at end of file with open(r'C:\Users\Windows 7\Desktop\12.txt','a',encoding='utf-8')as b:
b.write('小丽:11本\n')
b.write('张伟:16本\n')
\ 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