Commit 5d712435 by BellCodeEditor

save project

parent 4ad0553f
Showing with 13 additions and 2 deletions
......@@ -2,5 +2,16 @@
# a=open(r'C:\Users\EDZ\Desktop\book.txt','a',encoding='utf-8')
# a.write('小兰:12\n小丽:11\n李文:9\n张伟:16\n')
# a.close()
with open(r'C:\Users\EDZ\Desktop\book.txt','a',encoding='utf-8') as a:
a.write('x:12/nl:15/n')
with open(r'C:\Users\EDZ\Desktop\book.txt','r',encoding='utf-8') as a:
for i in a:
if 'x:12' in i:
print("有")
# else:
# print("没有")
# a.write('x:12\nl:15\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