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

How list operations change positionsappend("D")adds at the endinsert(1, "X")inserts before index 1del items[1]removes the item at index 1beforeABCafterABCDbeforeABCafterAXBCbeforeABCafterACIndexes belong to current positions, not permanently to items.Insertion and deletion can change the indexes of later items.

  • items.append(value) adds value at 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.

Fill in the blanks3 marks
The method gap 1 adds at the end. The method gap 2 places an item before a chosen index. The statement gap 3 removes the item at a chosen index.
  • append
  • del
  • index
  • insert
  • len

2. Follow changes in order

Start with queue = ["Ari", "Bo", "Cy"].

  1. queue.append("Dee") gives ["Ari", "Bo", "Cy", "Dee"].
  2. queue.insert(1, "Eli") gives ["Ari", "Eli", "Bo", "Cy", "Dee"].
  3. del queue[3] removes Cy, not Dee, because the earlier insertion changed the indexes.
Multiple choice1 mark

After all three worked operations, what is stored at queue[2]?

  • AEli
  • BBo
  • CCy
  • DDee
Written answer2 marks

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"].

Coding task4 marks
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.

Fill in the blanks3 marks
A new reading arrives after all existing readings, so use gap 1. An urgent job must become index 0, so use gap 2. A cancelled job is currently at index 4, so use gap 3.
  • append
  • del
  • index
  • insert
Written answer2 marks

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.

Multiple choice1 mark

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.