try that:

l = [['a','b','c'],['d','e','f']]
l.append([0,0,0])
Answer from Mario Khoury on Stack Overflow
🌐
Delft Stack
delftstack.com › "delft stack" › "howto" › "python how-to's" › "how to append 2d array in python"
How to Append 2D Array in Python | Delft Stack
February 22, 2025 - The append() method is useful when you want to expand a 2D list dynamically by adding more data over time. However, note that all rows may need to have the same length for structured data processing.
🌐
GeeksforGeeks
geeksforgeeks.org › python › appending-to-2d-list-in-python
Appending to 2D List in Python - GeeksforGeeks
July 23, 2025 - += operator allows you to extend a sublist with multiple elements in a concise manner. ... This is equivalent to using extend(). If we want to append multiple sublists dynamically list comprehension is a concise option.
Discussions

Appending to 2D lists in Python - Stack Overflow
this is the most bizarre functionality ... in Python. seems almost like a bug. 2021-11-22T22:26:19.01Z+00:00 ... Save this answer. ... Show activity on this post. ... In other words, all three list references refer to the same list instance. ... Save this answer. ... Show activity on this post. Came here to see how to append an item to a 2D array, but ... More on stackoverflow.com
🌐 stackoverflow.com
Two dimensional array in python - Stack Overflow
Shouldn't this be arr.append(...) instead of arr[0] = ..., to avoid IndexError: list assignment index out of range? 2011-11-18T13:37:52.21Z+00:00 ... There aren't multidimensional arrays as such in Python, what you have is a list containing other lists. More on stackoverflow.com
🌐 stackoverflow.com
preserving 2d list in for loops
In your first example, you append each item to a list (new_list), but since those items are just individually appended to the list, you end up with a 1-D list. A 2-D list is just a list of lists, so to retain that structure, you have to append lists to your variable new_list. I do notice a typo in your second example. You append temp_var.method() when you should append temp_var2.method() More on reddit.com
🌐 r/learnpython
6
4
April 25, 2023
python - How to append items into a 2D list? - Stack Overflow
I have a 2D list trends. I open a folder and go through every file in the folder (mostly CSV Files). For every file, I want to put the data into a new slot on the first dimension of the list. For e... More on stackoverflow.com
🌐 stackoverflow.com
June 4, 2021
People also ask

How do I create a 2D list in Python?
Use [[0] * columns for _ in range(rows)] so each row is a separate list that can be mutated independently.
🌐
pythonpool.com
pythonpool.com › home › tutorials › python 2d lists: create, index, copy, flatten, and loop
Python 2d List: From Basic to Advance
How do I access a value in a Python 2D list?
Use matrix[row][column], with both indexes zero-based, and validate row lengths when the list may be jagged.
🌐
pythonpool.com
pythonpool.com › home › tutorials › python 2d lists: create, index, copy, flatten, and loop
Python 2d List: From Basic to Advance
When should I use NumPy instead of a 2D list?
Use NumPy for large homogeneous numerical arrays, matrix operations, broadcasting, and vectorized calculations; use nested lists for small or irregular dependency-free data.
🌐
pythonpool.com
pythonpool.com › home › tutorials › python 2d lists: create, index, copy, flatten, and loop
Python 2d List: From Basic to Advance
🌐
Dot Net Perls
dotnetperls.com › 2d-python
Python - 2D List Examples - Dot Net Perls
Step 2 We access each sub-list and call append on it. This appends to the inner lists. Step 3 We display the element at indexes 0, 0 and this value is 1. With the print() method we can display the entire list contents. Step 4 This loop can iterate rows and columns in the 2D list.
🌐
Python Pool
pythonpool.com › home › tutorials › python 2d lists: create, index, copy, flatten, and loop
Python 2d List: From Basic to Advance
July 14, 2026 - Copy safely: Shallow row copies, aliasing, list multiplication, and deep copies. When the number of rows will grow over time, start with an empty outer list and append a new row for each record.
Find elsewhere
🌐
Snakify
snakify.org › two-dimensional lists (arrays)
Two-dimensional lists (arrays) - Learn Python 3 - Snakify
Another (but similar) way: create an empty list and then append a new element to it n times (this element should be a list of length m): ... But the easiest way is to use generator, creating a list of n elements, each of which is a list of m zeros: ... In this case each element is created independently from the others. The list [0] * m is n times consructed as the new one, and no copying of references occurs. Say, a program takes on input two-dimensional array in the form of n rows, each of which contains m numbers separated by spaces.
🌐
Iditect
iditect.com › faq › python › appending-to-2d-lists-in-python.html
Appending to 2D lists in Python
matrix = [[1, 2, 3], [4, 5, 6]] new_row = [7, 8, 9] matrix.append(new_row) "Python extend 2D list" Description: This query involves extending a 2D list in Python with additional elements.
🌐
Thedeveloperblog
thedeveloperblog.com › 2d-list-python
Python 2D List Examples
elements = [] # Append empty lists in first two indexes. elements.append([]) elements.append([]) # Add elements to empty lists. elements[0].append(1) elements[0].append(2) elements[1].append(3) elements[1].append(4) # Display top-left element. print(elements[0][0]) # Display entire list. print(elements) # Loop over rows. for row in elements: # Loop over columns. for column in row: print(column, end="") print(end="\n") Output 1 [[1, 2], [3, 4]] 12 34 · Jagged lists. The term "jagged" implies that sub lists have uneven lengths. Here we create a list of two lists—one of length 2, the other of length 5. We display their lengths. ... Python program that uses jagged lists # A jagged list.
🌐
YouTube
youtube.com › watch
How Does Append Work With 2d Lists In Python - YouTube
In this python tutorial we are talking about lists in python! Specifically, we are answering the question of how does append work with 2d lists in python! Le...
Published: January 4, 2023
🌐
IQCode
iqcode.com › code › python › python-2d-array-append
python 2d array append Code Example
temp_list = [[], [], [], []] temp_list[0].append("a1") temp_list[1].append("a2") temp_list[2].append("a3") tem...
🌐
Kosbie
kosbie.net › cmu › fall-11 › 15-112 › handouts › notes-2d-lists.html
2d Lists
Wrong: Cannot use * (Shallow Copy) # Try, and FAIL, to create a variable-sized 2d list rows = 3 cols = 2 a = [ [0] * cols ] * rows # Error: creates shallow copy # Creates one unique row, the rest are aliases! print "This SEEMS ok. At first:" print " a =", a a[0][0] = 42 print "But see what happens after a[0][0]=42" print " a =", a · Right: Append Each Row # Create a variable-sized 2d list rows = 3 cols = 2 a=[] for row in xrange(rows): a += [[0]*cols] print "This IS ok.
🌐
Reddit
reddit.com › r/learnpython › preserving 2d list in for loops
r/learnpython on Reddit: preserving 2d list in for loops
April 25, 2023 -

Very early into my newest hobby, learning to code so forgive my poor etiquette

Trying to figure out when iterating through a 2d list with a for loop

This structure doesn't preserve the 2d list

new_list = []
for temp_var1 in two_d_lst:
    for temp_var2 in temp_var1:
        new_list.append(temp_var2.method())

But this structure does

new_list = []
for temp_var1 in two_d_lst:
    unpacking_lst = []
    for temp_var2 in temp_var1:
        unpacking_lst.append(temp_var2.method())
    new_list.append(unpacking_lst)

I'm not sure I understand why...

Greatly appreciate sarcastic remarks, especially if it helps me understand this.

🌐
Kosbie
kosbie.net › cmu › fall-10 › 15-110 › koz › notes-2d-lists.html
Two-Dimensional Lists
Wrong: Cannot use * (Shallow Copy) # Try, and FAIL, to create a variable-sized 2d list rows = 3 cols = 2 a = [ [0] * cols ] * rows # Error: creates shallow copy print "This SEEMS ok. At first:" print " a =", a a[0][0] = 42 print "But see what happens after a[0]=42" print " a =", a · Right: Append Each Row # Create a variable-sized 2d list rows = 3 cols = 2 a=[] for row in range(rows): a += [[0]*cols] print "This IS ok.