Split String Using Multiple Delimiters in Python Nov 10th 2021 Words: 29

Input string: a,b,c;d;e;f

Output: [a, b, c, d, e, f]

Solution:

1
2
3
import re

re.split(',|;', 'a,b,c;d;e;f')