https://wikimass.com/python/sum-of-array