python: how to calculate the sum of a list without creating the whole list first?,sum(a)