0
What is the output of the following Python code?
def f(x, l=[]):
l.append(x)
return l
print(f(1), f(2), f(3))- A[1] [2] [3]
- B[1] [1, 2] [1, 2, 3]
- C[3] [3] [3]
- D[1, 2, 3] [1, 2, 3] [1, 2, 3]
Correct answer: D
What is the output of the following Python code?
def f(x, l=[]):
l.append(x)
return l
print(f(1), f(2), f(3))