Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to access specific index of matrix in python

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

#accessing 1
one = num[0][0]
print(one)

#accessing 6
six = num[1][2]
print(six)
Comment

PREVIOUS NEXT
Code Example
Python :: update table odoo13 
Python :: tkinter screen clicked 
Python :: Which of the following is not a core data type in Python programming? 
Python :: install python 3 ubuntu 16.04 
Python :: How to query one to many on same page 
Python :: How to correctly call url_for and specify path parameters 
Python :: How to solve import errors while trying to deploy Flask using WSGI on Apache2 
Python :: Django, limit queryset without slicing 
Python :: python QFileDialog select files 
Python :: walrus with ternary python 
Python :: flask login attemted_user cant see check_password_correction method 
Python :: clock replacement algorithm python 
Python :: ring Conversion Number 
Python :: store image in django postprocessimage in django storage 
Python :: ring Trace Library 
Python :: python list insert out of range 
Python :: size of variable 
Python :: numpy mask without losing shape 
Python :: capiatlize first letter in list 
Python :: python plot draw the goal line 
Python :: how to bubble search in python stack overflow 
Python :: pls help i need tkintwr help plspslspslspsl help tkinter 
Python :: qcombobox remove all items 
Python :: static instance and local variables in python 
Python :: inserting a charcater in a pyhtong string at a specific index 
Python :: python string copy 
Python :: correct code to read csv file in python 
Python :: How to call any function with it name as a string 
Python :: 1045 uri solution 
Python :: function with parameters python 
ADD CONTENT
Topic
Content
Source link
Name
5+2 =