separator
The string placed between items when they are joined, or removed between parts when a string is split.
In more detail
split(",") removes commas and returns what was between them; ",".join(parts) puts them back. print's sep parameter is the separator between printed values.
Related terms
- split() — A string method that cuts a string into a list of parts, at white space by default or at a separator you give.
- join() — A string method that glues a list of strings together with the string it is called on between them.
- sep — The keyword parameter of print that sets the text placed between its arguments; by default a single space.
Taught in
- Input, And Numbers Versus Digits — Hands-on Python: Complete Video Course & Book
- The String Format Method — Hands-on Python: Complete Video Course & Book
- Returning Values — Hands-on Python: Complete Video Course & Book
- Split And Join — Hands-on Python: Complete Video Course & Book
- Chapter Two In One Sitting — Hands-on Python: Complete Video Course & Book
- Thirty Questions, One Sneaky Print — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Print, Input And The Casts Between — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- Strings: Escapes, Slices And Methods — PCEP Certified Entry-Level Python Programmer (PCEP-30-02) Exam Prep
- String Methods The Exam Picks — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep
- Strings Sprint — PCAP Certified Associate in Python Programming (PCAP-31-03) Exam Prep