結果 : sum of first n elements in list python