Symptom
Creating multiple expenses without specifying tags causes them to share the same tag list. Adding a tag to one expense makes it appear on all previously-created expenses too.
e1 = Expense(10.0, "food", "Lunch", date(2024, 1, 1))
e2 = Expense(20.0, "food", "Dinner", date(2024, 1, 1))
e1.tags.append("work")
print(e2.tags) # ['work'] — but we never tagged e2!
What you know
The Expense class has an optional tags parameter. When you create two expenses without passing tags, then append a tag to the first, the second expense also shows that tag.
Hints
Python
Python ready
Test Output
▶
Click "Run Tests" to execute your code