List Operations: sort, remove, for-each: Coding lesson for kids
In “List Operations: sort, remove, for-each”, children learn about for fruit in fruits: print(fruit), fruits.sort() and fruits.remove("apple").
for fruit in fruits: print(fruit): Loops directly over EACH item in the list — no index or range() needed.
fruits.sort(): Puts the list in order — alphabetical for text, smallest-to-largest for numbers.
fruits.remove("apple"): Removes the first item that matches — "apple" specifically, not by position.
This lesson is part of Python in Coding at Pearls Valley Academy — Real code, beginner-friendly syntax.
Each lesson starts with a short narrated, animated explanation, then hands-on practice. A wrong answer gets a gentle hint, never a penalty, and children earn stars and pearls as they go.