I am trying to determine which tuple pair in a zip (tax_zip) generates the maximum of values in "welfare_levels". Really simple code to do this that I've made is below. However when I try to solve this it generates a list index out of range error. What is the issue with trying to index the list using the max_welfare_index?
tau_grid = np.linspace(0.0001, 1-1e-5,15)
tau_b_grid = np.linspace(0.0001, 1-1e-5,15)
welfare_levels = []
tax_zip = zip(tau_grid, tau_b_grid)
for t, tb in tax_zip:
S = society_welfare (0.6, t, tb)
welfare_levels.append(S)
maximum_welfare = max(welfare_levels)
max_welfare_index = welfare_levels.index(maximum_welfare)
print(max_welfare_index)
tax_zip2= list(tax_zip)
maximizing_taxes = tax_zip2[max_welfare_index]
print(maximizing_taxes)