Explain Python's indentation and why it matters.

Beginner

Answer

Python uses indentation to define code blocks instead of braces {}. This enforces consistent code structure and improves readability.

if x > 0:
    print("Positive")  # 4 spaces indentation
    if x > 10:
        print("Greater than 10")  # 8 spaces indentation
else:
    print("Non-positive")

Incorrect indentation results in IndentationError.