Update task2.py

main
p6fxi93qh 2 months ago
parent b8c9cad23d
commit 9b0894c748

@ -29,8 +29,7 @@ def findfrecuency(txt_path,keywords,outpath):
elif keyword in line:
keyword_count[keyword] += 1
resultword.append(line)
resultword1 = list(set(resultword))
writeintxt(resultword1,outpath) #去重
writeintxt(resultword,outpath)
return keyword_count#返回字典
else:
print("文件不存在\n")

Loading…
Cancel
Save