2019年11月17日

python split和os.path.split()

摘要: split:拆分字符串,通过指定的分割符对字符串进行切片,并返回分割后的字符串列表 语法:str.split(str= " ", num = string.count(str))[n] 参数说明: str:分割符,默认为空格,但不能为空,若字符串中没有分割符则把整个字符串作为列表的一个元素 num: 阅读全文

posted @ 2019-11-17 10:21 -有风来 阅读(353) 评论(0) 推荐(0) 编辑

导航