#读取文件内容
'''
def getMailInformatin(path1,encoding='utf-8',errors='ignore'):
with open(path1,'r') as f1:
num=0
num2=len(f1.readlines())
f1.seek(0)
while num<num2:
str1=f1.readline()
index1=str1.index('@')+1
index2=str1.index('.')
str2=str1[index1:index2]
if str2=='qq':
with open(path3,'w') as f11:
f11.write(str1)
num+=1
elif str2=='123':
with open(path4,'w') as f21:
f21.write(str1)
num+=1
getMailInformatin(path1) #调用函数
'''
#记录查询
'''
dict1={}
def getKFinpormatin(path2,str4):
with open(path2,'r',4,'utf-8') as f2:
num=len(f2.readlines())
f2.seek(0)
index3=0
while index3<num:
str1=f2.readline()
str2=str1[:2]
str3=str1[len(str1)-3:len(str1)-1]
dict1[str2]=str3
index3+=1
print(dict1[str4])
str5=input("输入查找人的姓名:")
getKFinpormatin(path2,str5)
'''