Se a substituição de elementos for escrita em duas linhas, a matriz será transportada incorretamente
x=[[i for i in list(map(int,input().split()))]
for _ in range(int(input()))]
print("Result:")
for i in range(len(x)):
for j in range(i,len(x)):
if i>0:
j-=1
x[i][j]=x[j][i]
x[j][i]=x[i][j]
[print(*i) for i in x]
Entrada: 3 1 2 3 4 5 6 7 8 9
Resultado: 1 4 7 4 5 6 7 6 9
Se a substituição dos elementos for escrita em uma linha, então o transporte da matriz ocorre corretamente
x=[[i for i in list(map(int,input().split()))]
for _ in range(int(input()))]
print("Result:")
for i in range(len(x)):
for j in range(i,len(x)):
x[i][j],x[j][i]=x[j][i],x[i][j]
[print(*i) for i in x]
Entrada: 3 1 2 3 4 5 6 7 8 9
Resultado: 1 4 7 2 5 8 3 6 9
Por que isso está acontecendo? Não entendo a diferença