Exam PCPP-32-101 Topic 7 Question 22 Discussion

Actual exam question for Python Institute's PCPP-32-101 exam
Question #: 22
Topic #: 7
Select the correct statements about the csv module.
(Select two answers.)

Suggested Answer: B,D Vote an answer

The correct answers are B and D. In Python's csv module, a normal csv.reader object reads each CSV row as a list of strings, so option B is true. A csv.DictReader object reads each row into a dictionary, using field names as keys, so option D is also true. Option A is false because DictReader does not always take headers from the first row; field names can be provided explicitly through the fieldnames argument. Option C is false because DictWriter requires field names so it knows which dictionary keys correspond to CSV columns and in what order they should be written. This distinction between row lists and row dictionaries is central to CSV processing.

by Greg at Jul 15, 2026, 11:05 AM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

0
0
0
10