Answers for "how do you split a string with multiple delimiters?"

12

how to split a string in python with multiple delimiters

>>> a='Beautiful, is; better*thannugly'
>>> import re
>>> re.split('; |, |*|n',a)
['Beautiful', 'is', 'better', 'than', 'ugly']
Posted by: Guest on June-09-2020

Code answers related to "how do you split a string with multiple delimiters?"

Python Answers by Framework

Browse Popular Code Answers by Language