?
What will be the output of the following Python code?
What will be the output of the following Python code?
def foo(i, x=[]):
x.append(x.append(i))
return x
for i in range(3):
y = foo(i)
print(y)
def foo(i, x=[]):
x.append(x.append(i))
return x
for i in range(3):
y = foo(i)
print(y)
Join the Discussion
Login to post a comment or share your explanation.
Login