QuestionQ40

VerifiedCoding Conventions, Best Practices, and Standardization

Select the correct statement about PEP 8 guidance for line breaks and binary operators.

Explanation

PEP 8 allows breaking either before or after a binary operator if the local style is consistent. For new code, it suggests Knuth’s style—placing the operator at the start of the continued line—because this generally makes operators easier to associate with their operands and improves readability.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!