PCEP Computer Programming and Python Fundamentals Practice Question
Which THREE of the following are valid ways to create a list in Python?
⚠ Common exam trap
The PCEP exam often tests the distinction between list literals (`[]`), tuple literals (`()`), and set literals (`{}`), trapping candidates who confuse the syntax for creating a list with that of other sequence or collection types.
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
✓
list((1, 2, 3))
The `list()` constructor can take an iterable, such as a tuple, and convert it into a new list. `list((1, 2, 3))` explicitly creates a list `[1, 2, 3]` from the tuple `(1, 2, 3)`. This is a standard and valid way to create a list in Python.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
list((1, 2, 3))
Why this is correct
Converts tuple to list.
- ✓
[x for x in range(3)]
Why this is correct
List comprehension creates a list.
- ✓
[1, 2, 3]
Why this is correct
Standard list literal.
- ✗
(1, 2, 3)
Why it's wrong here
Creates a tuple, not a list.
- ✗
{1, 2, 3}
Why it's wrong here
Creates a set, not a list.
Go deeper
Related to this question
About these practice questions
One of 498 original PCEP 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCEP 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 PCEP exam.