Use map with operator.add:

>>> from operator import add
>>> list( map(add, list1, list2) )
[5, 7, 9]

or zip with a list comprehension:

>>> [sum(x) for x in zip(list1, list2)]
[5, 7, 9]

Timing comparisons:

>>> list2 = [4, 5, 6]*10**5
>>> list1 = [1, 2, 3]*10**5
>>> %timeit from operator import add;map(add, list1, list2)
10 loops, best of 3: 44.6 ms per loop
>>> %timeit from itertools import izip; [a + b for a, b in izip(list1, list2)]
10 loops, best of 3: 71 ms per loop
>>> %timeit [a + b for a, b in zip(list1, list2)]
10 loops, best of 3: 112 ms per loop
>>> %timeit from itertools import izip;[sum(x) for x in izip(list1, list2)]
1 loops, best of 3: 139 ms per loop
>>> %timeit [sum(x) for x in zip(list1, list2)]
1 loops, best of 3: 177 ms per loop
Answer from Ashwini Chaudhary on Stack Overflow
Top answer
1 of 16
484

Use map with operator.add:

>>> from operator import add
>>> list( map(add, list1, list2) )
[5, 7, 9]

or zip with a list comprehension:

>>> [sum(x) for x in zip(list1, list2)]
[5, 7, 9]

Timing comparisons:

>>> list2 = [4, 5, 6]*10**5
>>> list1 = [1, 2, 3]*10**5
>>> %timeit from operator import add;map(add, list1, list2)
10 loops, best of 3: 44.6 ms per loop
>>> %timeit from itertools import izip; [a + b for a, b in izip(list1, list2)]
10 loops, best of 3: 71 ms per loop
>>> %timeit [a + b for a, b in zip(list1, list2)]
10 loops, best of 3: 112 ms per loop
>>> %timeit from itertools import izip;[sum(x) for x in izip(list1, list2)]
1 loops, best of 3: 139 ms per loop
>>> %timeit [sum(x) for x in zip(list1, list2)]
1 loops, best of 3: 177 ms per loop
2 of 16
139

The others gave examples how to do this in pure python. If you want to do this with arrays with 100.000 elements, you should use numpy:

In [1]: import numpy as np
In [2]: vector1 = np.array([1, 2, 3])
In [3]: vector2 = np.array([4, 5, 6])

Doing the element-wise addition is now as trivial as

In [4]: sum_vector = vector1 + vector2
In [5]: print sum_vector
[5 7 9]

just like in Matlab.

Timing to compare with Ashwini's fastest version:

In [16]: from operator import add
In [17]: n = 10**5
In [18]: vector2 = np.tile([4,5,6], n)
In [19]: vector1 = np.tile([1,2,3], n)
In [20]: list1 = [1,2,3]*n
In [21]: list2 = [4,5,6]*n
In [22]: timeit map(add, list1, list2)
10 loops, best of 3: 26.9 ms per loop

In [23]: timeit vector1 + vector2
1000 loops, best of 3: 1.06 ms per loop

So this is a factor 25 faster! But use what suits your situation. For a simple program, you probably don't want to install numpy, so use standard python (and I find Henry's version the most Pythonic one). If you are into serious number crunching, let numpy do the heavy lifting. For the speed freaks: it seems that the numpy solution is faster starting around n = 8.

🌐
W3Schools
w3schools.com › python › python_lists_add.asp
Python - Add List Items
To add an item to the end of the list, use the append() method.
Discussions

Adding together two lists?
You set a and b to empty lists on the first two lines of your function. Remove this. More on reddit.com
🌐 r/learnpython
6
2
November 1, 2022
Can someone explain to me how to add up all the numbers in a list without using sum?
Use a for loop! Iterate over the list and add each number to the final total More on reddit.com
🌐 r/learnpython
39
21
June 27, 2022
list.append() vs set.add()
"append" suggests positionality - it's adding something to the end of a list, whereas add just indicates adding to the collection, without neccessarily saying where it's added. Sets don't have an ordering, so there's really no such thing as an "end" of the set to append to, which is likely the rationale behind the different names : add just adds an item, whereas append adds it specifically at the end. More on reddit.com
🌐 r/learnpython
17
15
December 26, 2022
🌐
Google
developers.google.com › google for education › python › python lists
Python Lists | Python Education | Google for Developers
Python's built-in list type is defined using square brackets [ ] and elements are accessed using zero-based indexing.
🌐
Python documentation
docs.python.org › 3 › tutorial › datastructures.html
5. Data Structures — Python 3.14.8 documentation
June 26, 2026 - The list methods make it very easy to use a list as a stack, where the last element added is the first element retrieved (“last-in, first-out”). To add an item to the top of the stack, use append(). To retrieve an item from the top of the ...
🌐
Mimo
mimo.org › glossary › python › append()
Python List append Method: Dynamic List Expansion | Learn Now
This method modifies the list in-place, meaning it changes the original list directly and does not return a new list. ... Become a Python developer.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-add-the-element-in-the-list-with-help-of-indexing
How to add Elements to a List in Python - GeeksforGeeks
July 11, 2025 - To add multiple elements at once, use the extend() method. It appends each item from an iterable (like a list) to the existing list.
Find elsewhere
🌐
DigitalOcean
digitalocean.com › community › tutorials › python-add-to-list
How to Add Elements to a List in Python – Append, Insert & Extend | DigitalOcean
Learn how to add elements to a list in Python using append(), insert(), extend(). Compare performance, avoid common mistakes with this guide.
🌐
Devcamp
bottega.devcamp.com › full-stack-development-javascript-python › guide › how-to-add-list-python-with-both-in-place-copy-processes
How to Add to a List in Python with Both In Place and Copy Processes
Now once again a very important thing to understand is how python works with combining data types. If you're coming from other languages that might be a little bit more simple on the syntax or is less forgiving on the syntax perspective you may think you'd be able to do this where you could simply tack on this element into tags but this is going to give you an error because you can't combine a string with a list.
🌐
W3Schools
w3schools.com › python › gloss_python_join_lists.asp
Python Join Two Lists
There are several ways to join, or concatenate, two or more lists in Python.
🌐
Reddit
reddit.com › r/learnpython › adding together two lists?
r/learnpython on Reddit: Adding together two lists?
November 1, 2022 -

Hi, I'm trying to create a function which adds together items from two lists and I can't figure out what I'm doing wrong. My initial code was very similar to this but did not work, after googling other people's solutions I've essentially copy and pasted what multiple people on various forums advised, but still have not had any success. Currently it just prints out a blank list, "[ ]", and I don't know why. Can anyone help?

def list_sum(a, b):
    a = []
    b = []
    c = []
    for i in range(len(a)):
        listAdd = (a[i] + b[i])
        c.append(listAdd)
    return(c)
    
if __name__ == "__main__":
    a = [1, 2, 3]
    b = [4, 5, 6]
    add = list_sum(a, b)
    print(add)
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-adding-two-list-elements
Add Elements of Two Lists in Python - GeeksforGeeks
July 11, 2025 - DSA Python · Data Science · NumPy · Pandas · Practice · Django · Flask · Last Updated : 11 Jul, 2025 · Adding corresponding elements of two lists can be useful in various situations such as processing sensor data, combining multiple sets of results, or performing element-wise operations in scientific computing. List Comprehension allows us to perform the addition in one line of code.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-lists
Python Lists - GeeksforGeeks
3. Creating List with Repeated Elements: A list with repeated elements can be created using the multiplication (*) operator. ... Python list stores references to objects, not the actual values directly.
Published: 2 weeks ago
🌐
GeeksforGeeks
geeksforgeeks.org › python › sum-function-python
sum() function in Python - GeeksforGeeks
November 27, 2025 - The sum() function in Python is used to add up numbers from any iterable such as a list, tuple, set, or dictionary values.
🌐
freeCodeCamp
freecodecamp.org › news › how-to-add-to-a-list-in-python-list-addition-tutorial
How to Add to a List in Python – List Addition Tutorial
January 19, 2023 - The append() method helps you add to the end of a list, but if you want to add to any index you want, you can use the insert() method.
🌐
Real Python
realpython.com › python-append
Python's .append(): Add Items to Your Lists in Place – Real Python
March 18, 2026 - Python provides a method called .append() that you can use to add items to the end of a given list. This method is widely used either to add a single item to the end of a list or to populate a list using a for loop.
🌐
Medium
medium.com › data-science › 4-methods-for-adding-new-items-to-python-lists-7c4243e93416
4 Methods for Adding New Items to Python Lists | by Soner Yıldırım | TDS Archive | Medium
December 2, 2022 - List is represented as a collection of data points in square brackets and can be used storing values with different data types. Here is an example of a list: ... In this article, we will learn 4 methods for adding new items to Python lists.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-program-to-find-sum-of-elements-in-list
Find sum of elements in List - Python - GeeksforGeeks
... Explanation: List comprehension creates a new list identical to a and the sum() function then calculates the total of its elements, storing the result in res. reduce() function from the functools module applies a function (in this case, ...
Published: August 13, 2026
🌐
Sentry
sentry.io › sentry answers › python › sum a list of numbers in python
Sum a list of numbers in Python | Sentry
July 3, 2026 - Python provides a built-in sum function, which returns the sum of all items in an iterable (such as a list). For example: numbers = [1, 2, 3, 4, 5] total = sum(numbers) print(total) # Will print 15 (1 + 2 + 3 + 4 + 5) sum is an example of a ...