PEP 8

The official style guide for Python code, covering layout, naming and common idioms.

In more detail

The parts that matter most: four spaces per indentation level, snake_case for functions and variables, CapWords for classes, UPPER_CASE for constants, spaces around operators and lines kept reasonably short. A formatter applies most of it automatically.

Related terms

Taught in

References

Certification courses