Certified Professional in Python Programming (PCPP-32-101) — Question 22

Select the correct statements about the csv module. (Choose two.)

Answer options

Correct answer: B, D

Explanation

Option B is correct because the DictReader method indeed reads the header from the first line of the file. Option D is also correct as a reader object creates a list of strings for each row. Options A and C are incorrect because a DictReader does not map to a diet, and a DictWriter requires specifying a header.