题解 | 词频统计
词频统计
https://www.nowcoder.com/practice/ebff2814640a48fdb0d9690677f7c7de
# -*- coding:utf-8 -*-
class Frequency:
def getFrequency(self, article, n, word):
# write code here
count = 0
for i in range(n):
if article[i] == word:
count += 1
return count
查看6道真题和解析