描述:
python split()通过指定的分隔符对字符串进行切片,若参数num 有指定值,则仅分隔num个子字符串
语法:
str.split(str="",num=string.count(str))
参数:
str -- 分隔符,默认为所有的空字符,包括空格、换行(\n)、制表符(\t)等
num -- 分割次数
返回值:
返回分割后的字符串列表
注:这个只是个人学习笔记摘抄,内容来自:
http://www.runoob.com/python/att-string-split.html