Commit b13f7a7e by BellCodeEditor

save project

parent ea6118bb
Showing with 13 additions and 6 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
dlrb=open(r"C:\Users\稚慧人生\Desktop\jjy.txt",'w',encoding='utf-8')
dlrb.write('小兰:12本\n')
dlrb.write('小丽:11本\n')
dlrb.write('李文:9本\n')
dlrb.close()
\ No newline at end of file
#dlrb=open(r"C:\Users\稚慧人生\Desktop\jjy.txt",'w',encoding='utf-8')
#dlrb.write('小兰:12本\n')
#dlrb.write('小丽:11本\n')
#dlrb.write('李文:9本\n')
#dlrb.close()
#dlrb=open(r"C:\Users\稚慧人生\Desktop\jjy.txt",'a',encoding='utf-8')
#dlrb.write('小红:10本\n')
#dlrb.close()
with open(r"C:\Users\稚慧人生\Desktop\jjy.txt",'r',encoding='utf-8') as dlrb:
a=dlrb.read()
print(a)
\ 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