List methods change a list in useful ways.
Use <code>append()</code> to add at the end and <code>insert()</code> to add at a chosen position.
tasks = ["Learn Python", "Practice loops"]
tasks.append("Build a project")
print(tasks)append() adds one new item after the current final item.
['Learn Python', 'Practice loops', 'Build a project']remove(value) removes a matching value. pop(index) removes an item at an index and returns it.
Important difference: remove() looks for a value; pop() works with a position and gives the removed item back.
items = ["book", "pen", "bag"]
items.remove("pen")
removed = items.pop(1)
print(items)
print(removed)After removing "pen", the list shifts left, so index 1 then refers to "bag".
numbers = [5, 10, 15]
print(len(numbers))
print(10 in numbers)len() counts items and in checks whether a value is present.
