Split() in python is a in-build function and its work to convert the string to the list.
input in split() - string
output in split() - list
example -
s="My-String"
and we want to split that string like l=['My','String']
program -
s="My-text"
l=s.split("-")
print(l)
s="My.string"
l=s.split(".")
print(l)
s="first-second-third-fourth-fifth-sixth"
l=s.split("-")
print(l)
s="one,two,three"
l=s.split(",")
print(l)
['My', 'text']
['My', 'string']
['first', 'second', 'third', 'fourth', 'fifth', 'sixth']
['one', 'two', 'three']