split函数 -1

Searching…

www.runoob.com

Python split ()方法 - 菜鸟教程

语法 split () 方法语法: str.split(str="", num=string.count(str)). 参数 str -- 分隔符,默认为所有的空字符,包括空格、换行 (\n)、制表符 (\t)等。 num -- 分割次数。 默认为 -1, 即分隔所有。 返回值 返回分割后的字符串列表。 实例 以下实例展示了 split () 函数的使用方法:

go.lightnode.com

Python split () 函数详解与实用示例

Nov 11, 2025 · split() 方法会按照给定的分隔符,把字符串拆分成若干“子串”,并以列表形式返回。 可以把它想象成:在指定位置把一根“绳子”剪成一段段的小段。

www.w3schools.com

Python String split () Method - W3Schools

Definition and Usage The split() method splits a string into a list. You can specify the separator, default separator is any whitespace. Note: When maxsplit is specified, the list will contain the specified number of ...

zhuanlan.zhihu.com

Python中的split ()函数的用法 - 知乎

Python中有split ()和os.path.split ()两个函数,具体作用如下: split ():拆分字符串。 通过指定分隔符对字符串进行切片,并返回分割后的字符串列表(list) os.path.split ():按照路径将文件名和路径分割开 一、函…