I want to add several arrays together but they have different sizes.
I think the code should look like this
commission = [0.55,0.03,0.025,0.025] interest = [0.05,0.045] premium = 10 fund =  for i = 1 to 120 fund[i] = premium * (1 - commission[i]) + interest[i] * fund[i-1]
But the issue is that this will go out of bounds. I just want the commission to extend to all 120 periods. Same with the interest array. Usually in the past I have used the "upperbound" command within the for loop to do this calculation.
How is it done in python?