Posted on 7th May 2025|56 views
How to break a string with multiple delimiters in python?
Posted on 7th May 2025| views
b= ‘something, is; better*than\nnothing’
import re
print(re.split('; |, |\*|\n', b)
Output: ['something', 'is', 'better', 'than', 'nothing']