We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Re.split()
Re.split()
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']