Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python declare 2d list

length, breadth = x, y
matrix = [[-1 for j in range(breadth)] for i in range(length)]
# every element is -1
 
PREVIOUS NEXT
Tagged: #python #declare #list
ADD COMMENT
Topic
Name
9+7 =