Something very strange is happening to me. when i write this code down :
a = [3,2,4]
b = a
a.sort()
print(a)
print(b)
The variable "b" must be [3,2,4] and "a" must be [2,3,4]. But this result came out :
[2, 3, 4]
[2, 3, 4]
Why did it sort both of them? I think it only happens to lists,because I tried to write the code below :
dots = dotsDetecter(param).getDots()
wholeDots = dots
The variable "dots" is gonna be a list but after that whatever I do to the "dots" list, wholeDots variable changes exactly like dots.
Does anybody now why it is happening?