list=[3, 1, -1]
list [-1]=list [-2]
print(list)
ok my last post was closed, even though this is not about slicing. There are no semicolons. The question is an exam question from the Python Institute course. I do not understand why the result of this calculation is [3, 1, 1]
Can someone explain me how this works?