TypeError Traceback (most recent call last)
Cell In[1], line 21
16 monthly_costs[insurance] = {
17 ‘单位’: base_salary * rates[‘单位’]
18 }
19 else:
20 monthly_costs[insurance] = {
—> 21 ‘个人’: base_salary * rates[‘个人’],
22 ‘单位’: base_salary * rates[‘单位’]
23 }
25 # 总费用
26 total_individual_cost = sum(cost[‘个人’] for cost in monthly_costs.values())
TypeError: ‘int’ object is not subscriptable