Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python intitialize a 2d matrix

# initialize a matrix of rowxcol with -1
dp = [[-1]*col for _ in range(row)]
 
PREVIOUS NEXT
Tagged: #python #intitialize #matrix
ADD COMMENT
Topic
Name
2+3 =