Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to access all the elements of a matrix in python using for loop

numbers = [
    [1, 2, 3],
    [4, 5, 6],
    [7, 8, 9]
]

for i in range(3):
    for j in range(3):
        print(numbers[i][j])

 
PREVIOUS NEXT
Tagged: #access #elements #matrix #python #loop
ADD COMMENT
Topic
Name
5+8 =