title: python class that uses a list prints out address location
body: <p>I am currently new to programming and I would really appreciate that someone would clarify why I am getting the print result as a some type of location address instead of the values of the list.I am using <strong>python version 2.7</strong>
  also, I tried to override the <code>&lt;</code> operator inside this class and it seems to work properly as intended with the instances of the class, but again when I tried to sort the <code>list</code> variable containing items of instances of the defined class it prints out location addresses I guess, is it related to the same issue from before, and why it does that, I would appreciate it if someone would provide me with fix for this.</p>
  
  <pre><code>a=[0,4,100,4,200,3,300,3.2,400,2]
  b=[0,4,150,2.5,300,3,450,2.4,600,2]
  c=[0,4,150,2,300,3,450,2.4,600,2]
  class subs():
      def __init__ (self,vals):
          self.vals=vals
      def __lt__ (self,other):
          return min(self.vals[1:])-(self.vals[-2]
          -self.vals[self.vals.index(min(self.vals[1:]))-1]+1)&lt;min(other.vals[1:])
          -(other.vals[-2]-other.vals[other.vals.index(min(other.vals[1:]))-1]+1)
  sub1=subs(a)
  sub2=subs(b)
  sub3=subs(c)
  allsubs=[sub1,sub2,sub3]
  print allsubs
  allsubs.sort()
  print allsubs
  </code></pre>
  
  <p>This is what i get:</p>
  
  <pre><code>[&lt;__main__.subs instance at 0x05E4A148&gt;, &lt;__main__.subs instance at 0x05E4A288&gt;, &lt;__main__.subs instance at 0x05E4A328&gt;]
  
  [&lt;__main__.subs instance at 0x05E4A328&gt;, &lt;__main__.subs instance at 0x05E4A288&gt;, &lt;__main__.subs instance at 0x05E4A148&gt;]
  </code></pre>