I am completely lost here. I made some code illustrating the problem:
_list_ = [1, 2]
def function(thing):
return_list = []
thing1 = thing
for x in range(2):
thing1[x] = 2
return_list.append(thing1)
thing1 = thing
for x in range(2):
thing1[x] = 1
return_list.append(thing1)
return return_list
print(function(_list_))
prints:
[[1, 1], [1, 1]]
When I want it to print:
[[2, 2], [1, 1]]
I have got no idea why this is happening, and help is appreciated.