← All tasks
🔍
Intermediate

Mutable Default Argument

⏱ 4 min ⭐ 15 XP 🔁 3 attempts allowed

What you'll do

Each call to add_item should start with a fresh empty list unless one is supplied. Click the line(s) that contain the bug.

Scenario

Each call to add_item should start with a fresh empty list unless one is supplied. Click the line(s) that contain the bug.

Ready to try it?

Create a free account and subscribe to take "Mutable Default Argument". Earn 15 XP and track your internship progress.

Already have an account? Sign in