0
I’m building a matrix in python, but I can’t make the right impression. Someone could help me. Follow the code:
linhas = 4
entrada = input()
valor = entrada.split()
matriz = []
while (entrada != ''):
for i in range(linhas):
linha = []
for j in range(len(valor)):
valor[j] = int(valor[j])
linha.append(valor[j])
matriz.append(linha)
entrada = input()
print(*matriz, sep='\n')
When I type:
1 2 3 4
5 5 6 7
The impression is:
[1, 2, 3, 4]
[1, 2, 3, 4]
What am I doing wrong?