Possible Duplicate:
Python: How to print a class or objects of class using print()?
I currently have this 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
Now when I put something like Track('Kanye West','Roses','Late Registration')
into the terminal I get <__main__.Track object at 0x10f3e0c50>
How can I get it to return or print the value at that place?
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?