#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
javascript 写一段代码,判断一个字符串中出现次数最多的字符串,并统计出现的次数 function test(){ var bt = document.getElementById("bt"); bt.addEventListener("click",function(){ var str = "dafdsjkfnaiesdaadsllllllkkkkk444444444444444"; var obj = []; // 存放结果集的数组