I'm not sure what this error means:
TypeError: Parameters to generic types must be types. Got slice(typing.List, <class 'int'>, None).
I am trying to confirm if a matrix has a given cell/index in it.
(In matrix [[A, B, C], [D, E, F]]
does cell/index [0, 2]
exist? Yes at C).
My input parameter is a list specifying the cell's index. I want to take the cell/list and modify it to check if it exists. Every time I try to touch the parameter list, it gives the error.
def in_matrix(matr: List[List:int], cell: List[int]) -> bool:
b = cell.pop()
a = cell.pop()
print(a)
print(b)
for y in range(len(matr)):
for x in range(len(matr[y])):
if matr[a][b] == True:
return True
else:
return False