1.

What is the output of the following code? def foo(i, x=[]): x.append(i) return x for i in range(3): print(foo(i))

A. [0] [1] [2].
B. [0] [0, 1] [0, 1, 2].
C. [1] [2] [3].
D. [1] [1, 2] [1, 2, 3].
Answer» C. [1] [2] [3].


Discussion

No Comment Found