def accumList(L, normalizeTo=None):
    ''' L= [1, 2, 3,  4,  5]:        accumList(L)=> [1, 3, 6, 10, 15] 
        L= [0.25, 0.25, 0.25, 0.25]: accumList(L)=> [0.25, 0.50, 0.75, 1.00]
        normalizeTo: set the last number of the returned list to this value
    '''
    
    if normalizeTo: LL = normListSumTo(L, sumTo=normalizeTo)
    else: LL = L[:]

    r = range(1, len(LL))
    newList=[LL[0]]
    for i in r:
        newList.append( newList[-1]+ LL[i] )
    return newList
 L= [1, 2, 3,  4,  5]:        accumList(L)=> [1, 3, 6, 10, 15] 
        L= [0.25, 0.25, 0.25, 0.25]: accumList(L)=> [0.25, 0.50, 0.75, 1.00]
        normalizeTo: set the last number of the returned list to this value
    
recipes/Python/278257_List_Tools/recipe-278257.py