I am trying to find a method to find the submatrix of an array X where the user provides an input i and j like so:
def submatrix(X, i, j):
The expected output should be the matrix X without row i and column j.
Example :
X = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
submatrix(X, 1, 1)
[[1, 3],
[7, 9]]
I have tried to solve it on my own but obviously have not managed to do it and dont know where to begin. Hence asking for help.