split()方法有以下参数:
示例用法:
str = "Hello World"
result = str.split() # 使用默认的空格分隔符进行分割
print(result) # 输出:['Hello', 'World']
str = "apple,orange,banana"
result = str.split(",") # 使用逗号作为分隔符进行分割
print(result) # 输出:['apple', 'orange', 'banana']
str = "apple,orange,banana"
result = str.split(",", 1) # 使用逗号作为分隔符进行分割,最多分割1次
print(result) # 输出:['apple', 'orange,banana']