In Mission 3 of Paiza POH Lite4 1: From the input values, create a list with list = [4,5,1,10,3,4,1] 2: Extract and sum the three elements from this list as shown above, and store one group in the list "sum_list" (as in sum_list = [10,16,14,17,8]. ..)
The question is about part 2, sum_list[0:3] #10 sum_list[1:4] #16 sum_list[2:5] #14 ・ ・ ・ But how do you write a program in Python that adds and increments only the index of the list and extracts the total value of the elements of each range-specified "list"?
Or is there a way to extract and store the total value in the above figure other than the approach of extracting the total value from the index?
Recommended Posts