0

How to break a string with multiple delimiters in python?

Aug 20, 2020 in Python by Veerubhotla

1 answers to this question.

0

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

Related Questions

0 0 answers

What Does The XOR Operator Do?

What does the ^ (XOR) operator do and also how it performs?   

Oct 15, 2020 in Python by Jordan
0 1 answers

Python Filename Without Extension

How can I get a file name without extension in python?

Aug 20, 2020 in Python by Veerubhotla
0 1 answers

Python Shopping Cart

What is a python shopping cart?

Aug 20, 2020 in Python by Veerubhotla