Commit 98f076e7 by BellCodeEditor

save project

parent eb80ed61
Showing with 9 additions and 4 deletions
......@@ -3,6 +3,11 @@
# fil.write('小兰:12,\n小丽:11,\n小李:9,\n小张:16')
# fil.close()
fil=open(r'C:\Users\Think\Desktop\pop.txt','a',encoding='utf-8')
fil.write('小兰:12,\n小丽:11,\n小李:9,\n小张:16')
fil.close()
\ No newline at end of file
# fil=open(r'C:\Users\Think\Desktop\pop.txt','a',encoding='utf-8')
# fil.write('小兰:12,\n小丽:11,\n小李:9,\n小张:16')
# fil.close()
with open(r'C:\Users\Think\Desktop\pop.txt','r',encoding='utf-8')as fil:
for dada in fil:
if'小强:10'in dada:
print('数据在文件中')
\ 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