1. Home
  2. Data Science
  3. Python
  4. What is the default indentation recommended by PEP 8 in…

Added 25 Nov 2026

What is the default indentation recommended by PEP 8 in Python?

  1. 2 spaces
  2. 4 spaces Correct answer
  3. 8 spaces
  4. 1 tab

Correct answer

B. 4 spaces

6 views

MCQSEXAM

Explanation

PEP 8 recommends 4 spaces per indentation level.

Reference

Asked in: Python Interview Basics

https://docs.python.org/3/tutorial/introduction.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs