Posted on 28th January 2023|18 views
How to break a string with multiple delimiters in python?
Posted on 28th January 2023
b= ‘something, is; better*than\nnothing’
print(re.split('; |, |\*|\n', b)
Output: ['something', 'is', 'better', 'than', 'nothing']
STILL GOT QUERIES?
Copyright © 2013 - 2023 MindMajix Technologies