python quick question

Soldato
Joined
12 May 2004
Posts
7,018
Location
England
this function returns an empty list how why?



Code:
def calc (amt,total):
    r =[]
    t = total
    amt = amt
    c = len(amt)
    

    for i in range(c):
        r.append(float(amt[i]/sum(amt)*t))
        i = i+1


    return(r)
 
Back
Top Bottom