Commit 10413aa0 by BellCodeEditor

save project

parent dc22b1a3
Showing with 23 additions and 0 deletions
#filel=open(r'C:\Users\87580\Desktop\book.txt','w',encoding='utf-8')
#filel.write('小兰:12')
#filel.write('小丽:11')
#filel.write('李文:9')
#filel.write('张伟:16')
#filel.close
with open(r'C:\Users\87580\Desktop\book.txt','w',encoding='utf-8') as filel:
filel.write('小兰:12')
filel.write('小丽:11')
with open(r'C:\Users\87580\Desktop\book.txt','r',encoding='utf-8') as filel:
a=filel.read()
print(a)
with open(r'C:\Users\87580\Desktop\book.txt','r',encoding='utf-8') as filel:
b=filel.read()
print(b)
with open(r'C:\Users\87580\Desktop\book.txt','r',encoding='utf-8') as filel:
for i in filel:
if '小兰:12' ==l
print("小强在数据库中")
if '小强:10' ==l
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