title: Python Assigning value from one variable to another
body: <p>I am trying to implement some sort of local search. For this I have two arrays, which represent a list, that I am trying to optimize. 
  So I have one array as the current best array and the one I am currently analyzing. </p>
  
  <p>At the beginning I am shuffling the array and set the current best array to the shuffled array. </p>
  
  <pre><code>random.shuffle(self.matchOrder)
  self.bestMatchOrder = self.matchOrder
  </code></pre>
  
  <p>Then I am swapping a random neighboured pair in the array. 
  Now the problem I have is that when I am swapping the values in <code>self.matchOrder</code>, the values in <code>self.bestMatchOrder</code> get swapped.</p>
  
  <pre><code>a = self.matchOrder[index]
  self.matchOrder[index] = self.matchOrder[index + 1]
  self.matchOrder[index + 1] = a
  </code></pre>
  
  <p>"index" is given to the function as a parameter, it is just randomly generated number.</p>
  
  <p>I guess I did something wrong assigning the variables, but I can't figure out what. So what can I do to only assign the value of the array to the other array and not make it apply the same changes to it, too?</p>