According to PEP 8, how many spaces should be used for each indentation level?
Correct answer
D. 4
16 views
D. 4
16 views
PEP 8, Python's style guide, recommends 4 spaces per level and no tabs mixed with spaces. Tools such as black and flake8 enforce it automatically.
Asked in: NTS, Python Developer Interviews
Not sure why the answer is D? Ask here and get an explanation.