Suppose I have the following method and the following list:
def ModificaValores(Valores):
dados = [6,5,4,3,2,1,0]
Valores = dados
Valores = [0,1,2,3,4,5,6]
print(Valores)
ModificaValores(Valores)
print(Valores)
Why in the output I have the following result:
[0, 1, 2, 3, 4, 5, 6]
[0, 1, 2, 3, 4, 5, 6]
If I modify element by element works, but not so. Explain to me why this happens!