Practice mode Python

What maximum line length does PEP 8 recommend for lines of Python code?

Correct answer C. 79 characters

Explanation

PEP 8 recommends limiting all lines of code to a maximum of 79 characters. The tighter limit of 72 characters applies to flowing text such as docstrings and comments, which is why 72 is a tempting distractor. Teams may agree on longer limits, but 79 is the guide's default.

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.