re.split()
The re.split() expression splits the string by occurrence of a pattern.
Code
>>> import re
>>> re.split(r"-","+91-011-2711-1111")
['+91', '011', '2711', '1111']
The re.split() expression splits the string by occurrence of a pattern.
Code
>>> import re
>>> re.split(r"-","+91-011-2711-1111")
['+91', '011', '2711', '1111']