题解 | #词频统计#
词频统计
http://www.nowcoder.com/practice/ebff2814640a48fdb0d9690677f7c7de
# -*- coding:utf-8 -*-
class Frequency:
def getFrequency(self, article, n, word):
# write code here
n = 0
for s in article:
if s == word:
n += 1
return n
