sum / average an attribute of a list of objects in python,sum(c.A for c in c_list)