Here is my code:
x,y= int(input()),list(map(int, input().split(" "))) ; y_2=y
for i in range(int(x/2)):
print(y_2.index(min(y)),y_2.index(max(y)))
del y[y.index(min(y))]
del y[y.index(max(y))]
When I checked y, it changed, which is what I want. But then, my backup list y_2 also changed. why is that?