def get_year(book):
 return int(book['date'].split()[1])

def get_year ( book ) : return int ( book [ 'date' ] . split ( ) [ 1 ] )
book["date"] looks like november 2014 so we need to split on the space and then take the second piece .