Python

Split string with multiple delimiters in Python

六二三
Python string split() method allows a string to be easily split into a list based on a delimiter. Though in some cases, you might need the separation to occur based on not just one but multiple delimiter values. This quick 101 article introduces two convenient approaches this can be achieved in Python. Split String With Two Delimiters in Python Assume the following string. text = "python is, an easy;language; to, learn.