diff --git a/task2.py b/task2.py index b481450..cb422a0 100644 --- a/task2.py +++ b/task2.py @@ -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")