A delimiter marks a boundary in structured text. In a flat file, it separates fields within a record: `Illinois|1979/01/01|17.48|994` has four pipe-delimited fields. Commas and tabs are also common choices. A delimiter works best when it is not expected inside a field value. section 21.2.3
Split a simple record
`"Illinois|1979/01/01|17.48|994".split("|")` returns `['Illinois', '1979/01/01', '17.48', '994']`. The fields remain strings; convert values such as temperatures or counts separately when needed. section 21.2.3
Python’s `split()` uses runs of whitespace when no delimiter is supplied. Pass a specific string to split on that sequence instead. Its optional second argument limits the number of splits, letting the final field contain otherwise troublesome text. To build a string, call `join()` on the desired separator: `"::".join(["Separated", "with", "colons"])` produces `Separated::with::colons`. section 6.4.1
For substantial delimited-file work, prefer the standard-library `csv` module to splitting every line yourself. Set `delimiter="|"` when reading a pipe-delimited file. Quoted fields can contain the delimiting character without ending the field; the module also handles that case when writing. A plain `split(",")` cannot make that distinction. section 21.2.4 section 21.5.1
Separators also appear between groups of digits, as in phone numbers. When normalizing phone numbers with several possible separator styles, matching only a few styles can miss valid inputs. If the input is known to be a phone number, one approach is to extract the digits, validate them, then insert the required separators. section 16.6.2










