QuestionQ21

VerifiedCoding Conventions, Best Practices, and Standardization

Choose the statements that are true about PEP 8 recommendations for string quotes.

Choose two
Explanation

PEP 8 treats single- and double-quoted string literals as equivalent, without prescribing one over the other, while requiring a consistent convention. When a literal contains a quote character, using the other delimiter avoids backslash escapes and improves readability. PEP 8 – Style Guide for Python Code

Learn more

Community Discussion

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