Adding and Removing Items
Use append and remove to change a list.
Adding and Removing Items is a free Coding for Kids lesson on CoddyKit — lesson 3 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the Coding for Kids learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
Changing Your List 🔧
Hello, list boss! 👑 Lists are not stuck forever. We can add new things and remove old ones anytime! 🎉
Adding with append() ➕
Use .append() to ADD a new item to the END of a list. Like dropping a toy in the basket! 🧺
fruits = ["apple", "banana"]
fruits.append("cherry")
print(fruits)The append Dot 🔘
We write the list name, a dot, then append() with the new item inside. Easy! 😄
pets = ["dog"]
pets.append("cat")
print(pets)Add Many Things 🎒
You can append over and over to grow your list bigger and bigger!
box = []
box.append("ball")
box.append("car")
box.append("kite")
print(box)It Goes at the End 🏁
New items always go to the end of the list. They line up nicely! 🚶
nums = [1, 2, 3]
nums.append(4)
print(nums)Removing with remove() ➖
Use .remove() to take an item OUT of the list. Just say which one!
fruits = ["apple", "banana", "cherry"]
fruits.remove("banana")
print(fruits)The remove Dot 🔘
Just like append, write the list name, a dot, then remove() with the item to delete.
pets = ["dog", "cat", "fish"]
pets.remove("cat")
print(pets)Add then Remove 🔄
You can add AND remove in the same program! Lists are super flexible. 🤸
jar = ["cookie"]
jar.append("candy")
jar.remove("cookie")
print(jar)Building a Shopping List 🛒
Let us build a shopping list by adding items one by one!
shopping = []
shopping.append("milk")
shopping.append("eggs")
shopping.append("bread")
print(shopping)Oops, Take It Back 🙈
Changed your mind? Remove an item you do not want anymore!
snacks = ["chips", "broccoli", "candy"]
snacks.remove("broccoli")
print(snacks)You Control the List! 🎉
Wonderful! Try adding your favorite animal, then removing one.
zoo = ["lion", "snake"]
zoo.append("panda")
zoo.remove("snake")
print(zoo)Quick Check 🧠
Quiz time! 🎯 Which one ADDS an item to a list?
Recap Time! 🌟
List boss! 🎓 Today you learned:
.append()adds an item to the end.remove()takes an item out- New items go to the end
- Lists can change anytime!
You are a list-changing champion! 🏆
Frequently asked questions
Is the “Adding and Removing Items” lesson free?
Yes — the full text of “Adding and Removing Items” is free to read here on the web, and the Coding for Kids course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the Coding for Kids course, upgrade to CoddyKit PRO.
What will I learn in “Adding and Removing Items”?
Use append and remove to change a list. You practise Coding for Kids with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start Coding for Kids?
No prior experience is required. Coding for Kids on CoddyKit is structured for beginners through advanced learners; this is — lesson 3 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “Adding and Removing Items” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this Coding for Kids lesson?
Yes. Every Coding for Kids lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- What Is a List?
- Getting Items by Position
- Adding and Removing Items
- Looping Through a List