TypeError Traceback (most recent call last)
Cell In[1], line 20
14 insurance_payments = {insurance: {
15 “单位”: base_salary * rate[“单位”],
16 “个人”: base_salary * rate[“个人”]
17 } for insurance, rate in payment_rates.items()}
19 # 计算总缴费
—> 20 total_payment = sum([unit_payment + personal_payment for unit_payment, personal_payment in insurance_payments.values()])
22 insurance_payments, total_payment
TypeError: unsupported operand type(s) for +: ‘int’ and ‘str’