Web
Hard
+20 XP
mutable default fix
The safe way to default a list arg is def f(x=None): if x is None: x=[]. This avoids:
Sign in to solve this challenge
Use your college email to start solving, earn XP, build a streak, and climb your college leaderboard. It is free.
Sign in with Google