The way to do this is clearly documented here.
Example:
>>> myString = "subString1|substring2|subString3"
>>> myString = myString.split("|")
>>> print myString
["subString1", "subString2", "subString3"]
More Related Contents:
- How can I split a string of a mathematical expressions in python?
- Split text after the second occurrence of character
- How to match a string to pattern “Foo-Bar”, where Bar can be any element of a list? [closed]
- Access multiple elements of list knowing their index
- I can’t install pyaudio on Windows? How to solve “error: Microsoft Visual C++ 14.0 is required.”?
- Nested arguments not compiling
- Two variables in Python have same id, but not lists or tuples
- Calculate average of every x rows in a table and create new table
- csv.Error: iterator should return strings, not bytes
- How to write binary data to stdout in python 3?
- Getting only element from a single-element list in Python?
- Get last “column” after .str.split() operation on column in pandas DataFrame
- How unique is Python’s id()?
- in selenium web driver how to choose the correct iframe
- `xrange(2**100)` -> OverflowError: long int too large to convert to int
- Django model “doesn’t declare an explicit app_label”
- How do I change the string representation of a Python class? [duplicate]
- Tkinter grid_forget is clearing the frame
- Add an element in each dictionary of a list (list comprehension)
- Django: OperationalError No Such Table
- How to get the least common element in a list?
- How to run multiple functions at the same time?
- “__init__” vs “__call__” in python class
- asyncio.sleep() vs time.sleep() in Python
- Scale Everything On Pygame Display Surface
- Python Turtle.Terminator even after using exitonclick()
- How to display uploaded image in HTML page using FastAPI & Jinja2?
- Is it necessary or useful to inherit from Python’s object in Python 3.x? [duplicate]
- str.isdecimal() and str.isdigit() difference example
- Parsing a pipe-delimited file in Python