Community resourceWorksheet
1CP2-CT-3.2 Manipulating one-dimensional lists
Part 2 of 7 · 1CP2-CT-3 · Lists, iteration and subprograms
The list manipulation worksheet, teaching append, insert and delete alongside the index shifts they cause.
Students will:
- append, insert and delete items in a list
- follow how the indexes move as each operation is applied
- carry out a specified sequence of changes in code
- choose the operation that matches a stated requirement
- diagnose an insertion placed at the wrong index
Inside: 6 explanation cells, 2 multiple-choice questions, 1 Python task, 2 fill-in-the-blanks cells and 2 written answers. 16 marks, about 45 minutes.
Series: 1CP2-CT-3 · Lists, iteration and subprograms, part 2 of 7.
Shared by Coding PathwayVerified teacher
- 13 cells
- About 45 minutes
- CC BY-SA 4.0
- Shared 17 Aug 2026
Preview
The whole resource, exactly as a class sees it. Answers and marking are held back.
Manipulating one-dimensional lists
Python lists are mutable: a program can change the existing list. Pearson's Programming Language Subset names three operations: append an item, insert an item before an index, and delete the item at an index.
Because positions may change, read the current list after every operation.
1. Three changes
items.append(value)addsvalueat the end.items.insert(index, value)inserts immediately before that index.del items[index]removes the item currently at that index.
After insertion or deletion, later items move and receive new indexes.
- append
- del
- index
- insert
- len
2. Follow changes in order
Start with queue = ["Ari", "Bo", "Cy"].
queue.append("Dee")gives["Ari", "Bo", "Cy", "Dee"].queue.insert(1, "Eli")gives["Ari", "Eli", "Bo", "Cy", "Dee"].del queue[3]removesCy, notDee, because the earlier insertion changed the indexes.
After all three worked operations, what is stored at queue[2]?
- AEli
- BBo
- CCy
- DDee
Explain why del queue[3] removes Cy after the insertion, even though Cy began at index 2.
Describe what insertion does to later indexes.
Students type their answer here.
3. Carry out specified changes
The starter list records workshop rooms. Add "Lab 4" at the end, insert "Lab 2" before the current item at index 1, then delete the item "Store" by its current index. Store the final list in rooms and print it.
Apply the operations in the stated order. The final list must be ["Lab 1", "Lab 2", "Lab 3", "Lab 4"].
rooms = ["Lab 1", "Lab 3", "Store"]
# Append, insert and delete, then print rooms.
4. Choose the operation from the requirement
Translate the wording before writing code: at the end suggests append; before position suggests insert; remove the item at position suggests del. Deleting by an old index after another change is a common logic error.
- append
- del
- index
- insert
A student writes names.insert(2, "Mina") because they want Mina to become the second item. Identify the error and correct the statement.
Remember that item number and index differ by one.
Students type their answer here.
What must a programmer reconsider after inserting an item near the start of a list?
- AThe data type of every variable
- BWhether the list is ordered
- CThe indexes of later items
- DWhether append still exists
Route forward
You can create and modify a list. Next you will generate count-controlled sequences with range() and repeat code using a for loop.