Practice mode Python

According to PEP 8, how many spaces should be used per indentation level in Python code?

Correct answer A. 4

Explanation

PEP 8, the style guide for Python code, recommends 4 spaces per indentation level and says spaces are the preferred indentation method. Tabs should only be used to stay consistent with code that already uses them, and Python 3 disallows mixing tabs and spaces for indentation.

Report a problem

Answer checked How we write and check questions

Tip: press A, B, C or D to answer, and N for the next question.

Advertisement

Have a question about this answer?

Your email address will not be published. Required fields are marked *

Links and website addresses are not allowed in comments.