Python’s list.insert(index, value) adds one object before a specified position in an existing list. Learn how zero-based indexes, negative indexes and out-of-range positions behave, with practical examples.
Python list.insert() syntax
list.insert(index, element)Parameters and return value
This method takes two parameters:
- index where an element needs to be inserted
- element is the element to be inserted in the list.
The method mutates the existing list and returns None. It inserts exactly one object before the specified index.
Insert one element at a specific position
# Creating a list
list_example = ['Pickupbrain', 'Well', 'Python']
# Inserting element to list at 2nd position
list_example.insert(1, 'Learn')
print('Updated List: ', list_example)
The output will be:
Updated List: ['Pickupbrain', 'Learn', 'Well', 'Python']
Insert a tuple as one list element
#Creating a list
tuple_data = [{1, 2}, [5, 6, 7]]
# Create a tuple (not a list)
integer_data = (3, 4)
# Inserting tuple to the list
tuple_data.insert(1, integer_data)
print('Updated List: ', tuple_data)
The output will be
Updated List: [{1, 2}, (3, 4), [5, 6, 7]]
Because Python indexes start at zero, index 1 means the second position. The tuple (3, 4) is inserted as a single object, rather than unpacked into separate list items.
How list.insert() handles indexes
items.insert(1, 'new') places 'new' before the element currently at index 1. The method changes the original list in place and returns None. Negative indexes are allowed: insert(-1, x) inserts immediately before the last item, not after it. An index larger than the list length appends; a very negative index inserts at the beginning.
Negative indexes, out-of-range indexes and performance
items.insert(-1, value) inserts immediately before the final element; items.insert(0, value) inserts at the beginning. An index greater than the length inserts at the end, while an index smaller than the negative length inserts at the beginning. Inserting near the front can require shifting existing elements, so a single insertion takes O(n) time in the worst case. For frequent insertions at both ends, consider collections.deque.
Common mistakes and fixes
Unexpected None: result = items.insert(1, 'x') assigns None to result; use items to see the changed list. Multiple items: insert(1, [2, 3]) creates one nested list; use items[1:1] = [2, 3] to insert two separate elements. Index error? Out-of-range integer indexes are clamped rather than raising IndexError; non-integer indexes raise TypeError.
See the official Python list-method documentation and our guide to list.extend() for adding several items.
Runnable examples: insertion positions and return value
These Python 3 examples show exactly where the new item goes. Notice that insert() returns None; it does not produce a new list.
items = [10, 20, 30]
result = items.insert(1, 15)
print(items) # [10, 15, 20, 30]
print(result) # None
items.insert(-1, 25)
print(items) # [10, 15, 20, 25, 30]
items.insert(100, 40)
print(items) # [10, 15, 20, 25, 30, 40]
items.insert(-100, 5)
print(items) # [5, 10, 15, 20, 25, 30, 40]Insert one item versus multiple items
insert() always adds a single object, even when that object is a list. To add several elements at the same position, use slice assignment. To append several elements at the end, use list.extend().
numbers = [1, 4]
numbers.insert(1, [2, 3])
print(numbers) # [1, [2, 3], 4]
numbers = [1, 4]
numbers[1:1] = [2, 3]
print(numbers) # [1, 2, 3, 4]Frequently asked questions
Q: How do I insert multiple values? A: Assign a slice, such as items[1:1] = [10, 20], or use repeated inserts. Q: How is insert different from append? A: append adds at the end, while insert places one object at a chosen index. Both modify the list in place.

C P Gupta is a YouTuber and Blogger. He is expert in Microsoft Word, Excel and PowerPoint. His YouTube channel @pickupbrain is very popular and has crossed 9.9 Million Views.