While making a program that solves a Rubik's cube on python I wrote this bit of code for turning the front face of a Rubik's cube:
c_top = top
c_front = front
c_left = left
c_right = right
c_back = back
c_bottom = bottom
for x in range(6,9):
right[x] = c_bottom[x]
top[x] = c_right[x]
left[x] = c_top[x]
bottom[x] = c_left[x]
For some reason it did something odd and changed c_bottom and other c_ things even though I only ran the function the code was in once. Does anyone know why?