tasks = ["read"]
tasks.append("practice")Line-by-line explanation
- The first line creates a one-item list.
tasks.appendselects the list’s append method.- The method adds practice to the end.
tasks.remove("read")Line-by-line explanation
removesearches for the value read.- That first matching item is deleted.
- The list now contains only practice.
pop() removes and returns an item by index. Assignment can replace an existing item.
tasks[0] = "review"Line-by-line explanation
- Index 0 selects the first item.
=replaces that position.- The list now contains review.