Commit 6f6d398b by BellCodeEditor

auto save

parent 0e742386
Showing with 19 additions and 0 deletions
# wert=open(r'C:\Users\Administrator\Desktop\test13.txt','w',encoding='utf-8')
# wert.write('小兰:12本\n')
# wert.write("小强:10本\n")
# wert.write('李文:9本\n')
# wert.write('张伟:16本\n')
# wert.close()
with open(r'C:\Users\Administrator\Desktop\test13.txt','r',encoding='utf-8')as wert:
for i in wert:
if "小兰" in i:
print("找到了!")
if '小强:10本' in i:
print("找到了!")
# wert:
# wert.write("小兰:12本\n")
# wert.write("小丽:11本\n")
# wert.write('李文:9本\n')
# wert.write('张伟:16本\n')
\ 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