(self)
| 13 | self.categories[category] = 0 |
| 14 | |
| 15 | def view_expenses(self): |
| 16 | for category, items in self.expenses.items(): |
| 17 | total_amount = sum(amount for _, amount in items) |
| 18 | print(f"{category}: ${total_amount}") |
| 19 | |
| 20 | def view_categories(self): |
| 21 | print("Categories:") |