Adding and removing list elements
๐ Scenario: You are managing a simple to-do list for daily tasks. You want to add new tasks and remove completed ones from your list.
๐ฏ Goal: Build a small program that starts with a list of tasks, adds a new task, removes a completed task, and then shows the updated list.
๐ What You'll Learn
Create a list called
tasks with three specific tasksCreate a variable called
new_task with a task to addAdd the
new_task to the tasks listRemove a specific task from the
tasks listPrint the final
tasks list๐ก Why This Matters
๐ Real World
Managing lists of tasks, shopping items, or any collection of things is common in daily life and software.
๐ผ Career
Knowing how to add and remove items from lists is a basic skill for programming jobs involving data handling and user input.
Progress0 / 4 steps