PY
py
1
2
3
4
5
6
7
8
9
10
# the re.split method splits the string where there is a match and returns a list of strings where the splits have occurred.
import re
string = 'Twelve:12 Eighty nine:89.'
pattern = '\d'
result = re.split(pattern, string)
print(result)
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run