repl.it
@manoj2rox/

Sub Matrix

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
def extarctSubMatrix(Matrix,ii,ij,ji,jj):
  result = []
  for i in range(ii,ij):
    aux = []
    for j in range(ji,jj):
      aux.append(Matrix[i][j])
    result.append(aux)
  return result

Matrix = [[1,2,3,13,14],
          [4,5,6,15,16],
          [7,8,9,17,18],
          [10,11,12,19,10]]


          
?