Commit 54ab34ed by BellCodeEditor

save project

parent 488d678d
Showing with 8 additions and 1 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本' # 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'李文:9本'、'张伟:16本'
with open(r'C:\Users\pc\Desktop\teacher_LU.txt','w',encoding='utf-8') as file: with open(r'C:\Users\pc\Desktop\teacher_LU.txt','w',encoding='utf-8') as file:
file.write('陆老师真聪明啊(嘲笑)') file.write('陆老师真聪明啊(嘲笑)\n')
file.write('跟猪一样\n')
file.write('好2啊\n')
file.write('猪都在笑他啊!\n')
file.write('猪来邀请他吃东西!\n')
with open(r'C:\Users\pc\Desktop\teacher_LU.txt','r',encoding='utf-8') as file:
a = file.read(r'C:\Users\pc\Desktop\teacher_LU.txt')
print(a)
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