Commit de0befec by BellCodeEditor

save project

parent dc22b1a3
Showing with 15 additions and 0 deletions
# 写入同学们的捐赠明细:'小兰:12本'、'小丽:11本'、'小丽:11本'、'张伟:16本'
AG = open(r"C:\Users\maku02\Desktop\VF.txt","w",encoding='utf-8')
AG.write('小兰:12本\n')
AG.write('小丽:11本\n')
AG.write('李文:9本\n')
AG.write('张伟:16本\n')
AG.write('小强: 10本\n')
AG.close()
with open(r"C:\Users\maku02\Desktop\VF.txt","r",encoding='utf-8') as f2:
for i in f2:
if '小强: 10本\n' in i:
print("在这里")
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