Python 读取文本中的单词
# -*- coding:utf-8 -*- import io import re class Counter: def __init__(self, path): """ :param path: 文件路径 """ self.mapping = dict() with io.open(path, encoding="utf-8") as f: data = f.read() words =