Use append() to add one item at the end of a list, extend() to add the items from an iterable at the end, and insert() to place one item at a chosen index. All three modify the existing list and return None.
How the three methods change a list
| Method | What you pass | What it adds | Where it adds it | Return value |
|---|---|---|---|---|
append(value) |
One value | That value as one item | At the end | None |
extend(iterable) |
An iterable | Each item yielded by the iterable | At the end | None |
insert(index, value) |
An index and one value | That value as one item | Before the item at the index | None |
These are in-place operations: they change the list you call them on rather than creating and returning a separate updated list. The Python 3.14.8 tutorial describes append() as similar to assigning a one-item list to the slice at the end, and extend() as similar to assigning the iterable there.
When to use append()
Choose append() when you want to add one value as a single new element at the end. The value itself can be another list or collection; append() does not unpack it.
items = ["a", "b"]
items.append(["c", "d"])
print(items)
# ['a', 'b', ['c', 'd']]
The nested list is one item inside items. Use append() when preserving the added object as a single element is the goal.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errors#1 Best Overall
When to use extend()
Choose extend() when you want to add the items from an iterable individually to the end of a list. Lists, tuples, and strings are examples of iterables described in the Python 3.14.8 built-in types reference.
items = ["a", "b"]
items.extend(["c", "d"])
print(items)
# ['a', 'b', 'c', 'd']
Because a string is iterable, extending with "cat" adds its characters individually, while appending "cat" adds the whole string as one item:
Rank #2
items = []
items.append("cat")
print(items)
# ['cat']
items = []
items.extend("cat")
print(items)
# ['c', 'a', 't']
When to use insert()
Choose insert(index, value) when you want to add one item at a particular position. The new value goes before the item currently at that index.
items = ["a", "b"]
items.insert(1, "x")
print(items)
# ['a', 'x', 'b']
items.insert(0, value)puts the value at the front.items.insert(len(items), value)adds it at the end, equivalent toitems.append(value).
Inserting near the beginning requires the following list elements to shift position. The tutorial notes that inserting or popping at the beginning is slow compared with end operations.
Why assigning a method call back to the list is a bug
Since these methods return None, do not assign their result back to the list. This common mistake discards the list reference:
items = ["a", "b"]
items = items.append("c")
print(items)
# None
Call the method on its own line instead:
items = ["a", "b"]
items.append("c")
print(items)
# ['a', 'b', 'c']
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Choosing a list operation for stacks and queues
For a list-backed stack, adding and removing items at the end is a suitable pattern. For a first-in, first-out queue, repeatedly inserting at index zero can require shifting the other elements. The Python tutorial recommends collections.deque for queues that need fast appends and pops at both ends; see its list and deque guidance.
Quick Recap
Best Value
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




