First thing you need to note is that the matrix creation is wrong, you need to add a new row after you have already entered values in the four positions of it, so the line m.append(linha)
must be outside the second for
.
Finding the greatest value is simple, just use the max
function combined with list comprehension , basically a new collection is created (linear this time) with all elements worry about its rows and columns) and in this linear collection the highest value is sought.
maior = max([valor for linha in m for valor in linha])
But as you need to find the indexes of it (row and column), I made a code that goes through all the elements, checks which is the largest and saves the row and column of it.
Is there a simpler way to do it, since Python has this philosophy of being simplistic? Most likely yes, but I have no idea what it would be like
m = []
for i in range(4):
linha = []
for j in range(4):
linha.append(int(input()))
m.append(linha)
maior_linha = 0
maior_coluna = 0
maior = m[0][0]
for l in range(4):
for c in range(4):
if maior < m[l][c]:
maior = m[l][c]
maior_linha = l
maior_coluna = c
print('linha do maior: {}\ncoluna do maior: {}'.format(maior_linha, maior_coluna))
See working on repl.it.