‘壹’ python统计一个大文件中很多小文件里面的词频
#!/usr/bin/envpython3.6
fromcollectionsimportCounter
fromfunctoolsimportrece
fromoperatorimportadd
frompathlibimportPath
ps=Path().glob('*.txt')
c=rece(add,[Counter(p.read_text().split())forpinps])
print(c.most_common())