主要是对正则表达式、字符串内建函数、collections模块的Counter类的应用。
正则表达式
http://www.runoob.com/python3/python3-reg-expressions.html
re.split split 方法按照能够匹配的子串将字符串分割后返回列表,它的使用形式如下:
re.split(pattern, string[, maxsplit=0, flags=0])
>>> import re
>>> txt = "The little prince crossed the desert and met with only one flower."
>>> strings = re.split('\W+', txt)