Junior Codes
Willow Island

Python Lists for Kids

Keep many values together in order, add to them and count them.

Start Wonderwild free with Pip

Try 5 starter activities free. Full access is ₹499 a year.

This mission is part of full access. The first missions are free to try.

Lists, explained simply

A variable holds one thing. A list holds many things in order, like a shopping list or a line of books on a shelf. You write a list with square brackets and put commas between the items.

Lists can grow. The append() method adds a new item to the end. The len() function tells you how many items are in the list right now.

Lists and loops are best friends. A for loop can visit every item in a list, one at a time, so you can print, check or change each one without knowing in advance how long the list is.

Example: Pack a bag

bag = ["map", "torch"]
bag.append("snack")
print(len(bag))
for item in bag:
    print("Packed:", item)

Output

3
Packed: map
Packed: torch
Packed: snack

Try this

  • Make a list of your three favourite foods and print how many there are.
  • Use append() inside a loop to add five numbers to an empty list.
  • Print the whole list at once with print(bag) and compare it with the loop.

Practise it in Wonderwild

“Make the island your own” and “Pack the explorer bag”

Mission 6 and Mission 19 in Willow Island, one of 36 Python missions in Wonderwild.

Your child writes and runs real Python in the browser while Pip reacts to every line. Nothing to install. For ages 7+.

Start Wonderwild free with Pip

Try 5 starter activities free. Full access is ₹499 a year.

This mission is part of full access. The first missions are free to try.

Questions parents and kids ask

Can a Python list hold different kinds of values?+

Yes. A list can hold words, numbers and even other lists together. In practice it is easier to keep one kind of thing in each list.

What is the difference between append() and len()?+

append() is a method you call on a list to add an item, written bag.append("snack"). len() is a function that counts items, written len(bag).

Prefer learning with a teacher?

Our live Python for Young Developers course teaches these ideas in small online classes led by a software engineer, with projects and feedback. Every live course also includes 12 months of full Wonderwild access for practice.

See the Python for Young Developers course