Commit cd1be9f1 by BellCodeEditor

save project

parent 88976e2f
Showing with 3 additions and 6 deletions
......@@ -5,9 +5,6 @@
# file1.write('李文:9本\n')
# file1.write('张伟:16本\n')
# file1.close()
#with open(r'C:\Users\w\Desktop\pig.text','a',encoding='utf-8') as file1:
#file1.write('徐安迪:20本\n')
with open(r'C:\Users\w\Desktop\pig.text','r'',encoding='utf-8') as file1:
for data in file1:
if '小丽:11'in data:
print("在数据里面")
with open(r'C:\Users\w\Desktop\pig.text','a',encoding='utf-8') as file1:
file1.write('徐安迪:20本\n')
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