Commit 27d8e083 by BellCodeEditor

save project

parent 887e11e4
Showing with 5 additions and 2 deletions
# 持家小能手 (利用自动更新成绩程序的逻辑完成这个新项目) # 持家小能手 (利用自动更新成绩程序的逻辑完成这个新项目)
# 如果输入的水果价钱比字典中的低,则替换掉,反之则不更新 # 如果输入的水果价钱比字典中的低,则替换掉,反之则不更新
new_data=''
with open(r'C:\Users\admin\Desktop\test.txt','r',encoding='utf-8')as file1: with open(r'C:\Users\admin\Desktop\test.txt','r',encoding='utf-8')as file1:
for data in file1: for data in file1:
if'1111111'in data: if'778787878'in data:
print('有') data=data.replace('778787878','8888')
new_data+=data
\ 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