Look at the following code snippets and decide which ones follow PEP 8 recommendations for whitespaces in expressions and statements (Select two answers.)
A)
No whitespace immediately before the opening parenthesis that starts the list of arguments of a function call:

B)
A whitespace immediately before a comma, semicolon, and colon:

C)
No whitespace between a trailing comma and a following closing parenthesis:

D)
A whitespace immediately after the opening parenthesis that starts indexing or slicing:

Suggested Answer: A, C
Get Premium PCPP-32-101 Questions
as Interactive Web-Based Practice Test or PDF
Real Exam Format
Detailed Explanations
Instant Access
Get Your Practice Test
12 comments · newest first
WE
Wendell
1 year ago
C is definitely a must-follow rule!
JA
Janae
1 year ago
I thought D was okay, but I guess not!
MA
Marcelle
1 year ago
Wait, isn't B also a common mistake?
RE
Rebecka
1 year ago
Totally agree, A and C are the right choices.
LI
Lili
1 year ago
Option A is correct, no whitespace before the parenthesis!
FE
Felicitas
1 year ago
I think Option D is wrong because I remember PEP 8 recommends no space after the opening parenthesis for indexing or slicing.
FR
Frankie
1 year ago
I feel like Option C is definitely a good choice because it mentions no whitespace before the closing parenthesis, which aligns with what we practiced.
YO
Yong
1 year ago
I'm not sure about Option B; I remember something about not having whitespace before commas, but I can't recall the specifics.
BO
Bobbie
1 year ago
I think Option A is correct since PEP 8 says no whitespace before the opening parenthesis in function calls.
EF
Effie
1 year ago
Wait, I'm a little confused. Is the quarantine process just about locking down network access, or does it actually move the files to a protected location? I need to re-read this carefully to make sure I understand the full functionality.
MA
Malinda
1 year ago
Okay, I think I've got it. The key is to focus on the transition from her husband to the Sorbonne. The answer that best captures that change in her situation is D) disappointment.
MI
Mireya
1 year ago
I'm a bit confused about the difference between master and child organization levels. I'll need to review that concept before answering.