Post
Python
How to break a string with multiple delimiters in python?
Posted on 26th April 2024
b= ‘something, is; better*than\nnothing’
import re
print(re.split('; |, |\*|\n', b)
Output: ['something', 'is', 'better', 'than', 'nothing']
STILL GOT QUERIES?