title: how to print/return a class in python?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1535327/python-how-to-print-a-class-or-objects-of-class-using-print">Python: How to print a class or objects of class using print()?</a>  </p>
  </blockquote>
  
  
  
  <p>I currently have this code: </p>
  
  <pre><code>class Track(object):
      def __init__(self,artist,title,album=None):
          self.artist = artist
          self.title = title
          self.album = album
  
      def __str__(self):
          return self.title + self.artist + self.album
  </code></pre>
  
  <p>Now when I put something like <code>Track('Kanye West','Roses','Late Registration')</code> into the terminal I get <code>&lt;__main__.Track object at 0x10f3e0c50&gt;</code> How can I get it to return or print the value at that place?</p>
  
  <p>I'm new to programming and especially new to 'object oriented programming', so my question is what exactly is a class? How do I define a function within a class? </p>