Commit 043604ee by BellCodeEditor

save project

parent dc22b1a3
Showing with 22 additions and 0 deletions
'''
sss=open('C:\\Users\\jiang\\Desktop\\test.txt','w',encoding='utf-8')
sss.write('小兰:12本')
sss.write('小强:12本\n')
sss.write('李明:15本\n')
sss.close
'''
'''
with open('C:\\Users\\jiang\\Desktop\\test.txt','w',encoding='utf-8') as sss:
sss.write('小兰:15本\n')
'''
with open('C:\\Users\\jiang\\Desktop\\test.txt','w',encoding='utf-8') as sss:
#sss.write('小兰:12本')
#sss.write('小强:12本\n')
#sss.write('李明:15本\n')
for i in sss:
if "小强:12本"in i:
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