Skip to content
Menu

Year 9 (ages 13–14, Grade 8 in the US) · Computing · Python: lists and functions · Lesson 1

Lists

Creating Python lists, indexing from 0, len, append, remove, changing items and looping through lists.

Exam boards: this lesson matches the AQA and Pearson Edexcel GCSE computing courses. Check which course your school follows.

Whiteboard video lesson: Lists

14-minute video lesson

Teaching, worked examples and 20 practice questions solved step by step.

Watch free for a month

What your child will learn

  • Create a list
  • Use indexes
  • Use list methods
  • Loop through a list

The method

  1. Indexes start at 0.
  2. len() counts items.
  3. .append() adds to the end.
  4. Use a for loop to visit each item.

Key words: list, index, append, len, loop, IndexError.

Worked examples

Worked examples from the lesson, with every step.

Question 1

What does this code print? (The code is shown below.)

  1. Step 1: Read the code

Answer: 10

Question 2

What does this code print? (The code is shown below.)

  1. Step 1: Read the code

Answer: 3

Question 3

What does this code print? (The code is shown below.)

  1. Step 1: Read the code

Answer: ['apple', 'kiwi', 'plum']