Add List Items
3 min read ·
Adding items to a list is one of the most common operations in Python.
Because lists are mutable, you can insert new elements at any position—beginning, middle, or end.
This topic covers all valid ways to add items to a list, with clear examples and edge cases.
Add Items Using append()
The
append() method adds one item to the end of the list.Add Items Using insert()
The
insert() method adds an item at a specific index.Syntax
Add Multiple Items Using extend()
The
extend() method adds multiple items from another iterable.Add List to Another List (Important Difference)
Using append()
Result is a nested list.
Using extend()
Result is a single flat list.
Add Items Using List Concatenation (+)
Original lists remain unchanged.
Add Items Using Slice Assignment
Add Items in a Loop
Add Items Conditionally
Add Nested Items
Common Mistakes
Expecting append() to Add Multiple Items
This adds a list inside a list.
Using Wrong Index in insert()
Python inserts at the end, not an error.
Performance Tip
append()is fast and preferredinsert()at the beginning is slower for large listsextend()is best for adding many items
This topic naturally leads to:
- Remove List Items
- List Copying
- List Comprehensions
- List Performance Tips