Python guides
Every published Python guide, newest first, with practical examples you can copy into your own project.
3,965 guides across 14 topics
Topics
Popular Python guides
Most readLatest Python guides
Page 159 of 179Python Raw String Literals: Syntax and Use Cases
python raw string literal: Learn how Python raw string literals treat backslashes literally, and when to use them for regex patterns, file paths, and other backslash-h...
Python Raw String: Syntax, Use Cases, and Limitations
Learn how Python raw strings work, why the r prefix preserves backslashes, and when to use them for regex patterns and Windows file paths.
Python Multiline String: Syntax and Pitfalls
python multiline string: Learn how to create and manage multiline strings in Python, including triple quotes, indentation handling, f-strings, and common pitfalls.
Python Triple Quoted Strings: Syntax and Use Cases
python triple quoted string: Learn how to use Python triple quoted strings for multi-line text, docstrings, and raw strings, with practical examples and common pitfalls.
Python Single vs Double Quotes: Syntax and Style
In Python, single and double quotes are interchangeable for string literals. This guide covers escaping, triple quotes, f-strings, and PEP 8 style recommendations.
Python String Literal: Syntax and Escapes
Understand Python string literal syntax: quoting styles, escape sequences, raw strings, f-strings, and bytes literals, along with common pitfalls.
Python String Behavior and Common Operations
python string: Understand Python string immutability, common methods, slicing, formatting, and performance tradeoffs for working developers.
Python zip vs enumerate: When to Use Each
Learn when to use Python's zip and enumerate for parallel iteration and indexed loops, with practical examples and performance insights.
Python enumerate vs range: When to Use Each
Understand the difference between Python's enumerate and range for indexed iteration, and learn which to use for readable, efficient loops.
Python zip strict: Enforcing Equal-Length Iterables
How Python's zip(strict=True) enforces equal-length iterables, with practical examples, edge cases, and compatibility notes.