Commit 7a6ca44f by BellCodeEditor

save project

parent 52d94659
Showing with 13 additions and 6 deletions
......@@ -5,8 +5,15 @@
# a.write('李文:9本\n')
# a.write('张伟:16本\n')
#a.close()
with open(r'C:\Users\Windows 7\Desktop\a.txt','a',encoding='utf-8')as a:
a.write('小兰:12本\n')
a.write('小丽:11本\n')
a.write('李文:9本\n')
a.write('张伟:16本\n')
\ No newline at end of file
# with open(r'C:\Users\Windows 7\Desktop\a.txt','a',encoding='utf-8')as a:
# a.write('小兰:12本\n')
# a.write('小丽:11本\n')
# a.write('李文:9本\n')
# a.write('张伟:16本\n')
# with open(r'C:\Users\Windows 7\Desktop\a.txt','r',encoding='utf-8')as a:
# b=a.read()
# print(b)
a=open(r'C:\Users\Windows 7\Desktop\a.txt','r',encoding='utf-8')
for i in a:
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