Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

length of a matrix in python

matrix = [[1, 2]]
rows = len(matrix) # Height.
columns = len(matrix[0]) # Width.
print(rows)
print(columns)
Comment

size of matrix python

>>> a=[[1,5,6,8],[1,2,5,9],[7,5,6,2]]
>>> len(a)
3
>>> len(a[0])
4
Comment

PREVIOUS NEXT
Code Example
Python :: python string math 
Python :: pandas save one row 
Python :: add whitespaces between char python 
Python :: pathlib path get directory of current file 
Python :: blinking an led with raspberry pi 
Python :: how to import file from a different location python 
Python :: python textbox 
Python :: how to generate random normal number in python 
Python :: pandas add two string columns 
Python :: count number of zeros in a number python 
Python :: python find index of minimum in list 
Python :: python match phone number 
Python :: dataframe get row by name 
Python :: comparing two dataframe columns 
Python :: calculate nth prime number python 
Python :: How to find xpath by contained text 
Python :: python get input from console 
Python :: how to round a number down in python 
Python :: replace transparent pixels python 
Python :: How many columns have null values present in them? in pandas 
Python :: python index list enumerate 
Python :: how to add element at first position in array python 
Python :: python pad with zeros 
Python :: python xml replace attribute value 
Python :: wolfram alpha python module 
Python :: python ftp login 
Python :: should i make tkinter in classes ? , Best way to structure a tkinter application? 
Python :: collections counter 
Python :: n-largest and n-smallest in list in python 
Python :: search google images python 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =