Adding to a list with append()
Adds a value to the end of a list, making it one item longer. Start with an empty list like scores = [] and use append() in a loop to build it up.
Understanding Adding to a list with append() in Years 7–8 Creating Digital Solutions
What it does: The loop runs 5 times and each time append() adds the current value of i to the end of the nums list. The text typed by the user is given to append(), so it is added to the end of the names list. Python lists use the append() method to add an item to the end. There is no add() method for lists. append() puts 'cat' into the empty list, so the list now has one item. Square brackets [] make a list. Round brackets () make something different, and it has no append(). The new value 3 goes on the end, after the items that were already there.
Common mistakes: Lists do not have an add() method. To put a value on the end of a list you use append(), so the line should be scores.append(s). append is a method, so the value goes inside round brackets, not square brackets. It should be names.append("Sam").
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 50–125) and word search (Modules 3–125).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
list.append(value)Fill in the Blanks
Spot the Error
Student with a class code? Join your class →