How to break a string with multiple delimiters in python?
Aug 20, 2020
in Python
by Veerubhotla
1 answers to this question.
b= ‘something, is; better*than\nnothing’
import re
print(re.split('; |, |\*|\n', b)
Output: ['something', 'is', 'better', 'than', 'nothing']
Aug 20, 2020
answered by Rushi