返回一个字符串中出现次数第二多单词的简单处理
import re
from collections import Counter
s = 'you are i,are ok,you are,i are you,are'
def second_count_word(s):
c = re.compile(r'\W')
ret = c.split(s)
lt=Counter(ret).most_common()
return (lt[1][0])
second_count_word(s)