Interview Question

What is PEP8?

PEP 8 provides widely used Python style conventions.

💡 Concept ✅ Quick Revision 🐍 Python

Answer

PEP 8 is the style guide for Python code in the standard library and many Python projects. • It covers naming, indentation, imports, whitespace, and code layout. • It recommends four spaces per indentation level. • Project consistency can justify documented local conventions.

💡 Simple Example

def calculate_total(price, quantity): return price * quantity

⚡ Quick Revision

PEP 8 provides widely used Python style conventions.