seasons = {'Spring': 1, 'Summer': 2, 'Fall': 3, 'Winter': 4}

def lcmp(a, b):
    a_season, a_year = a.split()
b_season, b_year = b.split()
return int(b_year) - int(a_year) or seasons[a_season] - seasons[b_season]
l = ['Fall 2014', 'Spring 2015', 'Fall 2008', 'Spring 2008']
l.sort(cmp=lcmp)
Python Custom Sort Function for a List