I was trying to copy a list to sort the copy but for some reason it sorted the original list as well. Here is the code part. I use the debugger to figure out what happened after the sort function.
p = [7,1,5,3,6,4]
copy = p
now according to debugger, (copy = [7,1,5,3,6,4]) then I do
copy.sort(reverse = True)
But now both copy and p = [7,6,5,4,3,1] I found the solution by copy = p.copy(). But I don't understand why original list also changed.