PCPP1 Library Modules Practice Question
When using configparser, what happens if you attempt to read a configuration file that does not exist using the read() method?
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
It returns an empty list.
The read() method returns an empty list and does not raise an exception.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
It raises a FileNotFoundError.
Why it's wrong here
The read() method is designed to fail silently for missing files.
- ✗
It raises a configparser.Error.
Why it's wrong here
It does not raise an exception.
- ✗
It creates an empty configuration object.
Why it's wrong here
It doesn't create the file, and the object remains empty if nothing was previously loaded.
- ✓
It returns an empty list.
Why this is correct
read() returns a list of successfully read files.
About these practice questions
One of 209 original PCPP1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed August 2026 · checked against the official Python Institute exam blueprint
This PCPP1 practice question is part of Courseiva's free Python Institute certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCPP1 exam.