SyntaxFix
Write A Post
Hire A Developer
Questions
You can split on a range of characters using the re module.
re
>>> import re >>> r = re.compile('[ \t\n\r:]+') >>> r.split("abc:def ghi") ['abc', 'def', 'ghi']