Question PRG-PY-0042
MediumWhat is the output of this program?
def f(x, items=None):
if items is None:
items = []
items.append(x)
return items
print(f(1), f(2))
- A.
[1, 2] [1, 2]
- B.
[1] [1, 2]
- C.
Sign up free to see the answer and a step-by-step explanation.