PEP 8 Style Guide for Python Code
Official docs outline
6 sections- Code lay-out
Indentation, line length and blank lines.
- Imports
Import grouping and ordering.
- Whitespace in expressions and statements
Where to use spaces around operators and brackets.
- Comments and docstrings
Comment style and docstring conventions.
- Naming conventions
snake_case, CapWords and constants naming.
- Programming recommendations
Idioms such as is None, exceptions and return consistency.
Each section links to the official page. Titles and summaries by Extra Credit; the docs belong to their authors.
More in Language and platform specs
All 33- Fetch Standard (WHATWG)
- HTML Living Standard (WHATWG)
- Java Language Specification
- Java Virtual Machine Specification
- Language Server Protocol
- Model Context Protocol Specification
- POSIX (IEEE Std 1003.1 and Open Group Base Specifications)
- Python Language Reference
- Python Typing Specification
- Selectors Level 4
- Service Workers (W3C)
- SQL (ISO/IEC 9075)