#use python3.6 import re from collections import Counter FILESOURCE = './abc.txt' def getMostCommonWord(artlclefilesource): pattern = r"""[A-Za-z]+|\$?\d+%?$""" with open(artlclefilesource) as f: r = re.findall(pattern,f.read
统计英文article.txt文件中出现hello这个单词的次数 这个是article.txt文件内容 { hello The Royal Navy is trying hello to play hello down the problem, after first trying to hide it. It is clearly embarrassing. They have hello known about the problem for hello some time but they