“What does ““Pythonic”” code adhere to?”
””“Pythonic”” code adheres to community conventions
“Where do idiomatic patterns arise from?”
“Idiomatic patterns arise from experience and practical use.”
“What happens when you write Python like another language?”
“Writing Python like another language leads to less readable
“How does knowing the Pythonic way improve code quality?”
“Knowing the Pythonic way of doing common tasks improves code quality.”
“Which Python version do most examples in the document use?”
“Most examples in the document use Python 3.7
“What is the most commonly preinstalled Python runtime?”
“CPython is the most commonly preinstalled runtime.”
“What might the ‘python’ command refer to on many systems?”
“On many systems
“What does ‘python3’ typically refer to?”
“python3 typically refers to Python 3.x.”
“How can you programmatically inspect your Python version?”
“You can programmatically inspect your version using the sys module.”
“When did Python 2 reach end-of-life and what does this mean?”
“Python 2 reached end-of-life on January 1
“What is the 2to3 migration tool?”
“2to3: Included with Python for converting Python 2 code to Python 3.”
“What is the six migration tool?”
“six: A community-supported compatibility library for writing code that works on both Python 2 and 3.”
“What is the recommendation for all new projects?”
“Use Python 3 for all new projects and development work.”
“Why is Python 2 deprecated?”
“Python 2 is deprecated and has not received bug fixes
“Why is continuing to use Python 2 discouraged?”
“Continuing to use Python 2 is discouraged due to the lack of official support.”
“Should you use spaces or tabs for indentation?”
“Use spaces
“How many spaces should you use per indentation level?”
“Indent using four spaces per level.”
“What is the line length limit according to PEP 8?”
“Limit lines to 79 characters or fewer.”
“How should you indent continuation lines for long expressions?”
“Indent continuation lines by 4 additional spaces beyond normal indentation.”
“How many blank lines should separate functions and classes in a file?”
“Separate functions and classes in a file with two blank lines.”
“How many blank lines should separate methods within a class?”
“Separate methods within a class with one blank line.”
“What is the spacing rule between keys and colons in dictionaries?”
“No space between keys and colons.”
“What is the spacing rule after colons in dictionaries?”
“One space after the colon
“What is the spacing rule for variable assignments with the = operator?”
“Use exactly one space before and after the = operator.”