title: Instance values being overwritten by latest incoming value
body: <p>I have two classes <code>Test_1</code> and <code>Test_2</code> where <code>test_2</code> includes the method <code>setValues</code>.</p>
  <pre><code>class Test_1():
  
      def __init__(self):
          self.dim = float
          self.list = Test_2()
  
  
      def init(self, dim, valuesT, valuesW):
          self.dim = dim
          self.list = [Test_2()] * dim
  
  
          for i in range(self.dim):
              self.list[i].setValues(mean[i], valuesT[i], valuesW[i])
  
  
  class Test_2():
  
      def __init__(self):
  
          self.mean = float
          self.T = float
          self.W = float
          
      def setValues(self, mean, T, W): 
  
          self.mean = mean
          self.T = abs(mean - T) 
          self.W = abs(W - mean) 
  </code></pre>
  <p>When I create an instance of <code>Test_1</code> and call the <code>init</code> method of this class passing the params <code>(3,[1,2,3],[3,4,5], [6,7,8])</code> I am expecting the creation of 3 instances of <code>Test_2</code> class and for the T and W values to be initialised in the list objects. However this is not the case and the T and W values seem to be overwritten for all 3 <code>Test_2</code> objects to the latest T and W values. The below code produces the values:</p>
  <p>1
  3
  6</p>
  <p>6
  6
  6</p>
  <pre><code>    for i in range(self.dim):
          self.list[i].setValues(mean[i], T[i], W[i])
          print(&quot;List while in loop: &quot;, self.list[i].mean)
  
      for i in range(self.dim):
          print(&quot;List after loop: &quot;, self.list[i].mean)
  </code></pre>
  <p>Could anyone help shed some light on why this may be? I'm fairly new to OOP.</p>