Symptom
Calling cleanup_expired_budgets() raises a RuntimeError: dictionary changed size during iteration.
What you know
The ExpenseStore class has a budgets dict mapping category names to Budget objects. The cleanup_expired_budgets() method should remove all budgets whose end date has passed. But it crashes every time there is at least one expired budget.
RuntimeError: dictionary changed size during iteration
Hints
Python
Python ready
Test Output
▶
Click "Run Tests" to execute your code