summaryrefslogtreecommitdiff
path: root/progs/a533.py
blob: 968f72df3d33160a081a2a4dd9074a4bbc13e2d3 (plain)
1
2
3
4
5
def sum_range_list(list1, m, n):                                                                                                                                                                                                
    sum_range = 0                                                                                                                                                                                                         
    for i in range(m, n+1, 1):                                                                                                                                                                                        
        sum_range += list1[i]                                                                                                                                                                                                  
    return sum_range