title: Array of class objects in Python 3.4
body: <p>How do i declare an array of class objects in Python 3.4? In C++ i can do it easily such a way: </p>
  
  <pre><code>class Segment
  {
  public:
  
      long int left, right;
  
      Segment()
      {
          left = 0;
          right = 0;
      }
  
      void show_all()
      {
          std::cout &lt;&lt; left &lt;&lt; " " &lt;&lt; right &lt;&lt; endl;
      }
  };
  
  int main()
  {
      const int MaxN = 10;
      Segment segment[MaxN];
  
      for(int i = 0; i &lt; MaxN; i++)
      {
          std::cin &gt;&gt; segment[i].left;
          std::cin &gt;&gt; segment[i].right;
      }
  }
  </code></pre>
  
  <p>In Python i have almost the same but can not find a way to create a list of class' objects and iterate through it as in C++.</p>
  
  <pre><code>class Segment:
  
      def __init__(self):
          self.left = 0
          self.right = 0
  
      def show_all(self):
          print(self.left, self.right)
  
  segment = Segment()
  </code></pre>
  
  <p>So how to make such a list?</p>