title: Creating a variable number of class instances
body: <p>My Class:</p>
  
  <pre><code>class myClass:
      pass
  </code></pre>
  
  <p>I am looking to recreate this effect:</p>
  
  <pre><code>x = myClass()
  y = myClass()
  z = myClass()
  </code></pre>
  
  <p>within a for loop because the number of times I need to loop will be varied each time.</p>
  
  <p>Trying this:</p>
  
  <pre><code>x = 3
  for i in range(x):
      cls = myClass()
  </code></pre>
  
  <p>doesn't work because on each iteration I recreate the class instance.</p>
  
  <p>My thinking is that on each loop I need to create a copy of the class and store that in a dict for referencing. So my questions are:</p>
  
  <ol>
  <li>Is this the right approach?</li>
  <li>How do I create a copy of a class?</li>
  </ol>
  
  <p>My attempts to create a class so far have been unsuccessful as the class isn't totally individual.</p>
  
  <p><pre><code>x = deepcopy(cls)</code></pre><br></p>
  
  <pre><code>CopyOfCls = type('CopyOfCls', cls.__bases__, dict(cls.__dict__))</code></pre>
  
  <p>EDIT: Answerers revealed that I was actually looking at creating multiple class instances.</p>