Sum / Average an attribute of a list of objects in Python,sum(c.A for c in c_list)