title: How Can Create A Class List In Python
body: <p>I'm learning C++ now, so I usually compare the C++ with Python. I found the list in C++ is so different from Python. For example, when I define a "struct", then create a list of them, I would use this code:</p>
  
  <pre><code>    struct foo exm[3]
  </code></pre>
  
  <p>It'll create a list which contain 3 elements of foo, also I can initialize the element if I want. I can use exm[i] to index the list, and it's the only way I can use the element, these elements are anonymous I think.</p>
  
  <p>How can I do the same progress in Python? I think I should create a new "class" to define the same "struct" in C++. But how about the list? The problem is I must create the explicit element and append it to the list later. How can I create that list quickly? On the other hand, how can I create a list that contains some new "class" object that is anonymous?</p>
  
  <p>Maybe it's a stupid question and without any practice, I'm just curious about it. Many thanks.</p>