Python实现统计文本中各单词数量 代码 运行结果 代码 import string s = 'not talk,not helo show me your code hello helo' for i in s: '''变例s中的字符,如果属于标点符号则替换成空格''' if i in string.punctuation: s = s.replace