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
🌐
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.
🌐
Vercaa
vercaa.com › index.php
Adding Array Items in Python: Appending Elements to Arrays - Vercaa Hosting
The extend() method in array class appends all the elements from another array of same typecode. ... import array as arr a = arr.array('i', [1, 2, 3, 4, 5]) b = arr.array('i', [6,7,8,9,10]) a.extend(b) print (a) ... array('i', [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]) The End! should you have any inquiries, ...
Discussions

Python appending array to an array - Stack Overflow
I am currently working on DES implementation.In one part of the code I have to append array to an array.Below is my code: C0=[1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 1,... More on stackoverflow.com
🌐 stackoverflow.com
How do I append a value to an array in Python? - Stack Overflow
For a numerical analysis class I need to make a for loop that must do a couple of things: Make a certain 'Dt' (a time step that gets smaller and smaller) and add this to an array called Dt_list. T... More on stackoverflow.com
🌐 stackoverflow.com
numpy.append() in Python --- slower (faster) than appending to a List ?
That's right. A numpy array is a real array in a computer science sense, which means it cannot be resized. Since appending requires resizing, numpy is forced to create a whole new array with a bigger allocation and copy all the old data over before adding any new data. This takes a lot of time. Python lists are resizeable therefore appending is very fast. More on reddit.com
🌐 r/learnpython
2
0
July 2, 2020
do you guys know how to add append an array in a 2d array?
Easy way: x = your_list[0] for i in range(len(5)): your_list.append(x) Might be a more optimized way to do it but at least it should work More on reddit.com
🌐 r/learnpython
5
5
February 19, 2024
🌐
Built In
builtin.com › software-engineering-perspectives › append-python
Python List Append() - How to Append Lists in Python | Built In
Our list index starts with 0 and ends with 5, which we can check using the pre-built len() function: ... The append() method in Python adds a single item to the end of the existing list.
🌐
Python documentation
docs.python.org › 3 › library › stdtypes.html
Built-in Types — Python 3.14.3 documentation
1 week 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 › gloss_python_array_add.asp
Python Add Array Item
Python Examples Python Compiler ... Q&A Python Bootcamp Python Certificate Python Training ... You can use the append() method to add an element to an array....
🌐
Tutorialspoint
tutorialspoint.com › home › python › python array append method
Python Array Append Method
February 21, 2009 - This method accepts the element that has to be appended. This method does not return any value. The following is the basic example of the Python Array append() method −
Find elsewhere
🌐
freeCodeCamp
freecodecamp.org › news › append-in-python-how-to-append-to-a-list-or-an-array
Append in Python – How to Append to a List or an Array
January 7, 2022 - In this article, you'll learn about the .append() method in Python. You'll also see how .append() differs from other methods used to add elements to lists. Let's get started! What are lists in Python? A definition for beginners An array in programmi...
🌐
TutorialsPoint
tutorialspoint.com › python-program-to-append-an-element-into-an-array
Python Program to Append an Element Into an Array
The element 9 is appended to the array, and which is added at the end of the array. The array module in Python allows us to create an array, and that can compactly represent an array.
🌐
Spark By {Examples}
sparkbyexamples.com › home › python › how to append numpy arrays examples
How to Append NumPy Arrays Examples - Python
March 27, 2024 - numpy.append() is used to append two or multiple arrays at the end of the specified NumPy array. The NumPy append() function is a built-in function in the NumPy package of Python.
🌐
Mimo
mimo.org › glossary › python › append()
Mimo: The coding platform you need to learn Web Development, Python, and more.
Learn Python's append() method to add elements to lists effortlessly. Discover its syntax, use cases, and examples to build dynamic and flexible lists.
🌐
IONOS UK
ionos.co.uk › digital guide › websites › web development › python append
How to use Python append to extend lists - IONOS UK
October 30, 2023 - However, arrays have certain ... when creating the array. Consequently, using the append() method to add elements of different data types to an array is not possible....
🌐
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
🌐
Python
docs.python.org › 3 › library › collections.html
collections — Container datatypes
Returns a new deque object initialized left-to-right (using append()) with data from iterable.
🌐
Stack Overflow
stackoverflow.com › questions › 72489660 › how-do-i-append-a-value-to-an-array-in-python
How do I append a value to an array in Python? - Stack Overflow
Second, concatenating with a structured array requires arguments with a matching dtype. On second thought, I am going to vote to close. Go back to your code and rewrite using lists and list appends.
🌐
Google Sites
sites.google.com › site › pythonpasapas › modules › array › array-append
Mon Python pas à pas - array.append ( )
element doit être une seule valeur ... type du tableau, Python lèvera une exception. La méthode array ( ).append ( ) ne peut ajouter qu'un seul et unique ......
🌐
W3Schools
w3schools.com › python › ref_list_append.asp
Python List append() Method
Python Examples Python Compiler ... Q&A Python Bootcamp Python Certificate Python Training ... The append() method appends an element to the end of the list....
🌐
Educative
educative.io › answers › how-to-append-an-array-in-python
How to append an array in Python
The append() function takes the value to which we want to add or attach an argument. The append() function returns an array containing the new value added to the end of the array.
🌐
Sarthaks eConnect
sarthaks.com › 3473395 › how-do-you-add-elements-to-an-array-in-python
How do you add elements to an array in Python? - Sarthaks eConnect | Largest Online Education Community
March 27, 2023 - LIVE Course for free · In Python, you can add elements to an array using various methods depending on the type of array you are working with
🌐
NumPy
numpy.org › devdocs › reference › generated › numpy.append.html
numpy.append — NumPy v2.5.dev0 Manual
>>> np.append([[1, 2, 3], [4, 5, 6]], [[7, 8, 9]], axis=0) array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])