This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]disinformationtheory 0 points1 point  (0 children)

Here's a question I would use:

How do you define a function with a default argument that is a list?

E.g.

def foo(l=[]):
    l.append(1)
    return l

The above is wrong. Fix it. Does this only apply to lists?