Commit c6c4bb4e by BellCodeEditor

save project

parent de4249da
Showing with 5 additions and 4 deletions
# 持家小能手 (利用自动更新成绩程序的逻辑完成这个新项目)
# 如果输入的水果价钱比字典中的低,则替换掉,反之则不更新
file1=open(r'C:\Users\admin\Desktop\test.txt','w',encoding='utf-8')
file1.write('1414424424')
file1.close()
\ No newline at end of file
with open(r'C:\Users\admin\Desktop\test.txt','a',encoding='utf-8')as file:
file1.write('1414424424\n')
file1.write('778787878\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