Python: Format String (Convert to String)
Ways to Format String
Format String lets you embed values in a template string, or convert different type of values to string.
To format a string:
- Python: f-String (Format, Template) → best
- Python: The .format (String Method) → good
- Python: Convert to String (repr, str) → useful for number to string.
- Python: Print with Percent Format String → bad
Python, format string
Python, String
- Python: Quote String
- Python: Triple Quote String
- Python: String Escape Sequence
- Python: Unicode Escape Sequence
- Python: String Prefix Character (u f r b)
- Python: Raw String (r-prefix)
- Python: f-String (Format, Template)
- Python: Print
- Python: Join String
- Python: Format String (Convert to String)
- Python: String Operations and Methods
- Python: Search Substring
- Python: Split String
- Python: String, Check Case, Char Class
- Python: Letter Case Conversion
- Python: Unicode 🐍
- Python 2: Unicode Tutorial