Using the code below, I am able to get the correct answer, however it is repeated twice.
For instance, I would only want a result of [1.2038, 1.206]
, but the code below prints [1.2038, 1.206, 1.2038, 1.206]
. Anybody knows what is wrong with my code? Any help would be greatly appreciated. Thanks!
spot = [1.2020, 1.2040]
forwardSwap = [0.0018, 0.0020]
forwardOutright = []
for i in range(len(spot)):
for i in range(len(forwardSwap)):
forwardOutright.append(spot[i] + forwardSwap[i])
print forwardOutright