Answers for "split string multiple delimimter pyhton"

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 "split string multiple delimimter pyhton"

Python Answers by Framework

Browse Popular Code Answers by Language