title: Array of objects in Python
body: <p>I want to define an array of objects (my defined class) of the same type in python.</p>
  
  <p>I tried to use an array module:</p>
  
  <pre><code>from array import *
  arrayIdentifierName = array("ClassName",[ClassName1,ClassName2,ClassName3])
  </code></pre>
  
  <p>it says:</p>
  
  <pre><code>TypeError: array() argument 1 must be char, not str
  </code></pre>
  
  <p>Then I tried to use a list:
  Using list won't help since I don't see a method in <a href="http://docs.python.org/2/tutorial/datastructures.html" rel="nofollow noreferrer">http://docs.python.org/2/tutorial/datastructures.html</a> that can reach each object without removing it from the list (for example: list.pop([i]) or list.remove(x) will remove the object and I need to change one of it's data members and save it).</p>
  
  <p>Any suggestion guys?</p>
  
  <p>Thanks</p>