Drag steps to the numbered slots on the right, or tap a step then tap a slot.
PCEP Practice Question: Functions, Tuples, Dictionaries and Exceptions
Order the steps to create and use a list in Python.
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
1. Create a list with brackets: my_list = [] 2. Assign it to a variable: my_list = [1, 2, 3] 3. Access elements by index: print(my_list[0]) 4. Modify elements by assignment: my_list[0] = 10 5. Grow the list with methods: my_list.append(4)
Lists are created with brackets, assigned to variables, accessed by index, modified by assignment, and grown with methods.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
1. Create a list with brackets: my_list = [] 2. Assign it to a variable: my_list = [1, 2, 3] 3. Access elements by index: print(my_list[0]) 4. Modify elements by assignment: my_list[0] = 10 5. Grow the list with methods: my_list.append(4)
Why this is correct
This is correct because you first create an empty list or a list literal, assign it to a variable, then you can access elements, modify them, and finally grow the list using methods like append.
- ✗
1. Access elements by index: my_list[0] 2. Create a list with brackets: [] 3. Assign it to a variable: my_list = [] 4. Modify elements by assignment: my_list[0] = 10 5. Grow the list with methods: my_list.append(4)
Why it's wrong here
This is incorrect because you cannot access elements before creating and assigning the list. The list must exist first.
- ✗
1. Create a list with brackets: my_list = [] 2. Access elements by index: print(my_list[0]) 3. Assign it to a variable: my_list = [1, 2, 3] 4. Modify elements by assignment: my_list[0] = 10 5. Grow the list with methods: my_list.append(4)
Why it's wrong here
This is incorrect because you are accessing elements of an empty list (which would cause an IndexError) before assigning the actual list content. The assignment to a variable should be done right after creation.
- ✗
1. Create a list with brackets: my_list = [] 2. Assign it to a variable: my_list = [1, 2, 3] 3. Grow the list with methods: my_list.append(4) 4. Access elements by index: print(my_list[0]) 5. Modify elements by assignment: my_list[0] = 10
Why it's wrong here
This is incorrect because you should access and modify elements before appending? Actually you can append anytime, but typically you access and modify existing elements before growing. Also, modifying after appending is fine, but the common logical order is access then modify then grow. However, the more critical error is that you might be trying to access index 0 after appending, which still works. But the expected order in typical usage is access first, modify, then grow. So this order is not the most logical.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 11, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.