You can append the elements of one list to another with the "+=" operator. Note that the "+" operator creates a new list.

a = [1, 2, 3]
b = [10, 20]

a = a + b # Create a new list a+b and assign back to a.
print a
# [1, 2, 3, 10, 20]


# Equivalently:
a = [1, 2, 3]
b = [10, 20]

a += b
print a
# [1, 2, 3, 10, 20]

If you want to append the lists and keep them as lists, then try:

result = []
result.append(a)
result.append(b)
print result
# [[1, 2, 3], [10, 20]]
Answer from stackoverflowuser2010 on Stack Overflow
🌐
Educative
educative.io › answers › how-to-add-one-array-to-another-array-in-python
How to add one array to another array in Python
In Python, adding one array to another is straightforward. The numpy.add() function and the + operator both perform element-wise addition efficiently. NumPy is ideal for handling numerical data, offering speed and convenience.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › how to append numpy arrays examples
How to Append NumPy Arrays Examples - Spark By {Examples}
March 27, 2024 - In this article, I will explain how to create NumPy arrays using numpy.array(), and then append arrays using append() function with examples. Depending on your usage see if you want to concatenate NumPy arrays.
🌐
DigitalOcean
digitalocean.com › community › tutorials › python-add-to-array
Python Array Add: How to Append, Extend & Insert Elements | DigitalOcean
April 15, 2025 - Learn how to add elements to an array in Python using append(), extend(), insert(), and NumPy functions. Compare performance and avoid common errors.
🌐
GeeksforGeeks
geeksforgeeks.org › python › python-add-array-item
Python Add Array Item - GeeksforGeeks
December 8, 2024 - This is one of the most straightforward ways to add an item to an array in Python. ... import array # Create an array arr = array.array('i', [1, 2, 3]) # Add an item using append() arr.append(4) print(arr)
🌐
Python documentation
docs.python.org › 3 › library › stdtypes.html
Built-in Types — Python 3.14.3 documentation
4 days ago - If k is not equal to 1, t must have the same length as the slice it is replacing. The value n is an integer, or an object implementing __index__(). Zero and negative values of n clear the sequence. Items in the sequence are not copied; they are referenced multiple times, as explained for s * n under Common Sequence Operations. ... Append value to the end of the sequence This is equivalent to writing seq[len(seq):len(seq)] = [value].
🌐
W3Schools
w3schools.com › python › numpy › numpy_array_join.asp
NumPy Joining Array
HTML CSS JAVASCRIPT SQL PYTHON JAVA PHP HOW TO W3.CSS C C++ C# BOOTSTRAP REACT MYSQL JQUERY EXCEL XML DJANGO NUMPY PANDAS NODEJS DSA TYPESCRIPT ANGULAR ANGULARJS GIT POSTGRESQL MONGODB ASP AI R GO KOTLIN SWIFT SASS VUE GEN AI SCIPY AWS CYBERSECURITY DATA SCIENCE INTRO TO PROGRAMMING INTRO TO HTML & CSS BASH RUST · NumPy HOME NumPy Intro NumPy Getting Started NumPy Creating Arrays NumPy Array Indexing NumPy Array Slicing NumPy Data Types NumPy Copy vs View NumPy Array Shape NumPy Array Reshape NumPy Array Iterating NumPy Array Join NumPy Array Split NumPy Array Search NumPy Array Sort NumPy Array Filter
Find elsewhere
🌐
Python
docs.python.org › 3 › library › itertools.html
itertools — Functions creating iterators for efficient looping
5 days ago - def zip_longest(*iterables, fillvalue=None): # zip_longest('ABCD', 'xy', fillvalue='-') → Ax By C- D- iterators = list(map(iter, iterables)) num_active = len(iterators) if not num_active: return while True: values = [] for i, iterator in enumerate(iterators): try: value = next(iterator) except StopIteration: num_active -= 1 if not num_active: return iterators[i] = repeat(fillvalue) value = fillvalue values.append(value) yield tuple(values) If one of the iterables is potentially infinite, then the zip_longest() function should be wrapped with something that limits the number of calls (for example islice() or takewhile()). This section shows recipes for creating an extended toolset using the existing itertools as building blocks.
🌐
NumPy
numpy.org › doc › 2.3 › reference › generated › numpy.append.html
numpy.append — NumPy v2.3 Manual
>>> np.append([[1, 2, 3], [4, 5, 6]], [[7, 8, 9]], axis=0) array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
🌐
Google
developers.google.com › google for education › python › python lists
Python Lists | Python Education | Google for Developers
January 23, 2026 - Python's built-in list type is defined using square brackets [ ] and elements are accessed using zero-based indexing. Assigning one list variable to another makes both variables point to the same list in memory. The for and in constructs are used to iterate over list elements or check for element presence. The range() function is often used with a for-loop to create a traditional numeric loop. Various list methods like append(), insert(), extend(), index(), remove(), sort(), reverse(), and pop() are available to modify and interact with lists.
🌐
Quora
quora.com › How-do-I-add-to-an-array-in-Python
How to add to an array in Python - Quora
Answer (1 of 3): I am assuming you’re talking about “Lists” in python. You can append/add data to a list in python with the “append” method. Eg: arrList.append(“data”). You may want to check out 5. Data Structures - Python 3.9.4 documentation
🌐
Medium
medium.com › @whyamit101 › how-to-append-two-arrays-in-numpy-efa74e5e2788
How to Append Two Arrays in NumPy? | by why amit | Medium
February 26, 2025 - If you’ve ever needed to merge two arrays in NumPy, numpy.append() is your go-to method.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › python append element to array
Python Append Element to Array - Spark By {Examples}
May 31, 2024 - How to append an element to an array in Python? In Python, you can use the append() method to append an element to the end of an array. However, it’s important to note that Python does not have a built-in array data type, but you can use lists, ...
🌐
W3Schools
w3schools.com › python › python_arrays.asp
Python Arrays
You can use the append() method to add an element to an array. ... You can use the pop() method to remove an element from the array. ... You can also use the remove() method to remove an element from the array.
🌐
AskPython
askpython.com › home › how to append an array in python?
How to append an Array in Python? - AskPython
January 16, 2024 - That is, the specified element gets appended to the end of the input array. The append() function has a different structure according to the variants of Python array mentioned above.
🌐
Python documentation
docs.python.org › 3 › tutorial › datastructures.html
5. Data Structures — Python 3.14.3 documentation
You can’t use lists as keys, since lists can be modified in place using index assignments, slice assignments, or methods like append() and extend(). It is best to think of a dictionary as a set of key: value pairs, with the requirement that the keys are unique (within one dictionary).
🌐
TutorialsPoint
tutorialspoint.com › python-program-to-push-an-array-into-another-array
Python Program to push an array into another array
May 29, 2023 - The indexing in python starts from 0, so that the above array elements are accessed using their respective index values 0, 1, 2, 3, 4. Pushing an array into another array means, inserting all elements present in array_1 into the array array_2. So that the elements of array_1 will be added at the end of array_2. Assume we have two arrays A and B with integer values. And the resultant array will have inserted elements of array B into the array A.
🌐
Vultr Docs
docs.vultr.com › python › third-party › numpy › append
Python Numpy append() - Add Elements to Array | Vultr Docs
April 10, 2025 - Here, python append to numpy array is done efficiently by appending elements to a list first, then converting it to a NumPy array in one step.