The class:
class Book(object):
def __init__(self, title, author):
self.title = title
self.author = author
def get_entry(self):
return "{0} by {1} on {}".format(self.title, self.author, self.press)
that doesn't work. If you specify positions, you have to do it through the end:
return "{0} by {1} on {2}".format(self.title, self.author, self.press)
In your case, best is to leave python treat that automatically:
return "{} by {} on {}".format(self.title, self.author, self.press)