Python sort klasa według atrybutu
import operator
sorted_x = sorted(x, key=operator.attrgetter('score'))
# In Place:
x.sort(key=operator.attrgetter('score'))
Healthy Hummingbird