Python str.split() Online
Split by delimiter.
Run details
The output updates as you type. The tool processes input in your browser.
Worked example
Provide a literal separator. Preserve empty fields if adjacent separators represent missing values.
- Delimiter
","- Maximum splits (-1 for all)
-1
a,b,c,d
[ "a", "b", "c", "d" ]
Using this operation in Python
The interactive result uses JavaScript. Python str stores Unicode text. Encode to bytes when an API expects UTF-8 or another byte representation.