Python: SUM task