Commit 417bf312 by BellCodeEditor

auto save

parent 94776576
Showing with 3 additions and 5 deletions
...@@ -9,8 +9,6 @@ with open('C:\\Users\\Administrator\\Desktop\\test.txt','a',encoding='utf-8') as ...@@ -9,8 +9,6 @@ with open('C:\\Users\\Administrator\\Desktop\\test.txt','a',encoding='utf-8') as
a.write('牛哥:18本\n') a.write('牛哥:18本\n')
a.write('虫大:13本\n') a.write('虫大:13本\n')
a.write('虫二:19本\n') a.write('虫二:19本\n')
a.write('秋刀鱼:10本\n')
with open('C:\\Users\\Administrator\\Desktop\\test.txt','r',encoding='utf-8') as a: with open('C:\\Users\\Administrator\\Desktop\\test.txt','r',encoding='utf-8') as a:
#print(a.read())
for i in a: \ No newline at end of file
if '虫二:19本' 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